Live data from Hacker News

How to build apps pragmatically

alextoussaint.com

31–40 of 51 posts

Re: How to build apps pragmatically

#31

More often than otherwise, I’ve found code duplication preferable over abstraction. I only abstract code when I understand the problem space really, really well (I.e. have solved it before), or when I can have some certainty the wrong abstraction won’t cost me too much time to fix.

I try to follow the Rule of Three

https://en.wikipedia.org/wiki/Rule_of_three_(computer_progra...

Re: How to build apps pragmatically

#33
post #2

What are "Watcher Views"?

I think they mean the following. In Django, a view function, or view for short, is a Python function that takes a Web request and returns a Web response. So a watcher view is probably a view that returns an extremely short response. It's just telling you whether more data is available, or not. They mention websockets as an alternative that's far more complex.

Yup exactly you've understand it all.

Re: How to build apps pragmatically

#34
post #2

What are "Watcher Views"?

Do you still have to poll a Watcher View - if it's an endpoint that tells you if the model is updated or not?

Yes you do, except that it's much faster for the backend to answer as it just hits a cache instead of doing a db query and serializing the whole model.

Re: How to build apps pragmatically

#36

> Try to build a complex server-rendered web app with PHP because "It's more inclusive" or "it has better frontend performance". See you in 2030. Like Facebook, WordPress and MediaWiki? Bashing PHP is a popular pastime, but front-end performance and inclusion are not to be scoffed at. Especially not if your target audience has a different standard of living than that of a major European city. Personally, I'm much mor…

Well yes, like all of them. It's just that building complex apps with a lot of interactions gets messy super quickly when you render everything on the server. It brings a lot of limitations that are hard to deal with.

Re: How to build apps pragmatically

#37

"Use Popular Tools", "Old Doesn't Mean Gold" and "Use The Right Tool" are all kind of contradictory. "Cool" and "popular" are usually correlated. "Old" might correlate inversely with "cool" but directly with the ease of finding plugins, Stack Overflow issues and blog posts. IMO, the criteria to use when evaluating a tool are 1) cost of building it yourself, 2) how well you know the tool, 3) how big the community is,…

Exactly, it's a balance to find.

Re: How to build apps pragmatically

#38

It's odd the author chose Django because it's "popular" and dismissed PHP because it's "old". Laravel is far newer and more popular than Django and PHP is both newer and more popular for web dev than Python. Why would the author insinuate Laravel (and presumably WP and the rest of PHP) will be dead by 2030? For that matter, is it pragmatic for a startup to worry at all about what the best choice ten years in the futu…

> Why would the author insinuate Laravel (and presumably WP and the rest of PHP) will be dead by 2030? I think the author meant that writing a complex server-rendered webapp in PHP would take very long, hyperbolically saying it would take until 2030.

You've got it all right!

Re: How to build apps pragmatically

#39

> Try to build a complex server-rendered web app with PHP because "It's more inclusive" or "it has better frontend performance". See you in 2030. Like Facebook, WordPress and MediaWiki? Bashing PHP is a popular pastime, but front-end performance and inclusion are not to be scoffed at. Especially not if your target audience has a different standard of living than that of a major European city. Personally, I'm much mor…

yeah. he lost me with that.

Re: How to build apps pragmatically

#40
why is this trash got submitted? author picked Django but trash talk PHP. Apple to Apple. shouldn't you compare Django to laravel? Wikipedia, WP, Facebook and countless other site/project have been build with PHP. so...like WTF?

HN is going down in quality with trash like this.

Post reply on HN