114 points · by arikr · 10y ago · 82 comments
1: Which technologies are popular and what do people like about them? (To help someone deciding between). Seems like React frontend, or perhaps Vue? and Node being the popular backend?
2: Is there a site that keeps track of the various options for frontend and backend frameworks and how their popularity progresses?
If not, I would still go with Rails. Its massively productive, batteries included... and forces you to learn some practices that you can later take to other frameworks (migrations, asset pipeline, etc).
I dont know of any other framework that forces you to adopt these. On HN, you will find a lot of rhetoric against that - which may be true for experienced programmers.
But for sheer productivity from someone new to all this... Rails really cannot be beaten.
In the JS world, you will spend atleast a couple of days figuring out Requirejs vs AMD vs commonjs vs webpack vs browserify vs npm vs yarn.
I'm not so sure if it is worth it...unless learning JS frameworks was your goal all along.
I'm always keep in an eye out for a Rails replacement, and a good database story is the first thing that I look for.
React has one of the gentler learning curves of the front end frameworks, but it's still a lot more work than just rendering everything server-side and adding whatever minimal effects you need with jQuery.
I second sandGorgon's recommendation to use Rails. PHP is another good option. It's absolutely amazing how many successful new software companies are being built off of WordPress and/or Laravel.
I say this as someone who was using React in February 2014 and who loves to geek out over newer more powerful technologies. The thing is, your users don't care. Groupon was launched as a crappy WordPress site + a mailing list, built way past its breaking point, migrated to Rails, broke again and was a $5B company in 5 years. Many, many startups with harder-core technologists started years earlier still haven't reached where they are now even with a perpetual string of problems and failures from their IPO until now. Teespring started on Rails long after that was cool and they're a juggernaut.
Use something productive and ship it.
Your clients don't care if your backend is written in PHP, Rails, or Go. Use whatever is your best tool in order to ship it quickly. It's "acceptable" to have a reasonable amount of fun, but don't waste time learning a whole new stack at the risk of validated learning.
Unless it's supposed to be a fun project to begin with.
However, I'm curious: at what point do you think the flavour-of-the-month JS frameworks actually do make sense for a development team / company? This might just be me being old and set in my webdev ways - I remember when PHP4 arrived on the scene, for goodness' sake - but I do struggle to see the business case for a lot of the current JS-everywhere, a-million-tools-for-everything environment, and I suspect I'm missing something key.
2. I stumbled upon http://stackshare.io the other day, I can't vouch for it but seemed nice to have a quick overview of what languages / framework / services are used around.
Otherwise:
If you like Python, Django.
If you like Ruby, Rails.
Otherwise: Flip a coin.
Heads? Rails.
Tails? Django.
A lot of very smart people will tell you that PHP is as good an option as Rails or Django. The problem with PHP is that while the upside for PHP is, as they're observing, just as good as the Rails/Django upside, the downside is way worse.
Counterintuitively: I think you should really know what you're doing as a developer before you decide on PHP. PHP isn't by itself going to teach you to be a better developer. Python will.
Avoid Javascript frameworks until you really understand what you're doing. Also, know ahead of time that "really understanding what you're doing" might result in you continuing to avoid complicated Javascript. A trap I can tell you about from recent experience. :)
Probably don't build front-end web applications in Go.
Can you explain how the downside is way worse?
> A trap I can tell you about from recent experience. :)
If it's not too much to ask, please share your experience briefly. Like me, a lot of folks here would be interested to hear your thoughts on this topic.
As a result, it is not particularly unusual to come across a PHP app that has been in production (and maintained!) continuously for nearly a decade that have all the SQL and JS inline, for example.
For backend: Go with anything that you are proficient with. If you aren't familiar with anything I recommend starting with RubyOnRails/Sinatra/Django/web2py/Phoenix.
2. Yes - http://bestof.js.org/ See also http://stateofjs.com/2016/introduction/ ,
The documentation for beginners is top notch as well: https://www.meteor.com/tutorials https://guide.meteor.com/
There's plenty of options, too. You can throw together a few files and have a simple app going in a very short time (an hour or two), or build highly modular apps with a React or Angular front-end.
Haskell + Elm or PureScript + Postgres
The best part about it is that it helps you catch many errors at compile time, instead of having your app crash at run time.
For keeping your Haskell and Elm data types in sync while maintaining sanity, I recommend elm-export [0], which will automatically generate the Elm types and JSON decoders from your Haskell code, using GHC Generics. Watch the author talk about it [1].
Choosing Elm over JS already gives you a head start, but you might hit a productivity wall at some point, and PureScript gives you all that extra power with its advanced type system. Some related discussion here [2].
Check out Matt Parsons' blog [3] for more on Haskell, Elm and PureScript.
Lastly, for database you can use Persistent [4] which gives you a type-safe API for data modelling and data store, and can automatically generate and perform migrations for you.
[0]: https://github.com/krisajenkins/elm-export
[1]: https://www.youtube.com/watch?v=sh4H8yzXnvw
[2]: https://www.reddit.com/r/haskell/comments/569cax/
[3]: http://www.parsonsmatt.org/
[4]: https://hackage.haskell.org/package/persistent
P.S. Do take my suggestions with a grain of salt as I don't have much experience with any of the fancy JS frameworks.
So far I've only used Yesod myself, but Spock looks very promising and I've heard great things about Servant for writing APIs.
"No one really knows."
There is (in my opinion) no reason not go with TypeScript. It's strictly better than ES6. React and MobX because of their simplicity.
Backend: Go
No particular reason to choose Go other than it's fun. TypeScript with Node is also a good choice.
Edit: I am talking about SPAs.
The Semantic UI React integration also doesn't need jQuery, which is a nice bonus.
I agree with the TypeScript suggestion. It's so good, and the VS Code integration is awesome.
[1] https://javascriptobfuscator.herokuapp.com/ [2] http://semantic-ui.com/ [3] http://react.semantic-ui.com/introduction
My advice is that there is no clear winner. Each technology serves a spectrum of needs, some better than others. If you're experienced enough to know what you need, then vet each technology in terms of what they offer to solve your problem. If not, my advice is to pick something that appears reasonable and go with it; you'll learn a lot, and eventually you'll arrive at the conclusion that all of these things are just tools--your own experience is the strongest thing you bring to the table.
For backend, I prefer Play + Scala over Ruby/Python because of the static typing.
How do you communicate between Polymer on the front-end and Play in the backend?
I settled for Flask[2], SASS (using egg, my own boilerplate/micro-framework [3]) and Vue.js [4].
Simplest to get started with, gets the job done and scale nicely.
[1]: http://wiredcraft.com [2]: http://flask.pocoo.org/ [3]: http://wiredcraft.github.io/egg/ [4]: https://vuejs.org/
One great thing about this architecture is that it can scale as the app gets more complex, since you can just add more components to the UI, and more fields to the GraphQL schema, without needing to re-structure anything.
I work on Apollo, a set of tools to make it easy to create and use a GraphQL API, and we have a hello world client [0] and server [1]:
[0] https://github.com/apollostack/frontpage-react-app [1] https://github.com/apollostack/frontpage-server
If you are looking at building basic webapps, I will really recommend Meteor. It is very intuitive, flexible and Javascript across the whole stack. It can easily integrate with Vue and React, which are again JS friendly.
Django is very neat and you can learn how to code within a week looking at the sourcecode of Wagtail.io ... I did it that way.
PHP is very straightforward and pretty much every issue that you run into would perhaps have a solution ready for you on StackOverflow.
So, since your question says "basic" I'll leave it at that.
If you're building simple CRUD apps for a business audience both Rails and Spring Boot would be good choices for instance.
In terms of front-end development I'd suggest vanilla JavaScript and HTML5. Keep things simple. A basic web app doesn't need any complex framework.
That said Angular, React.js and Vue.js are equally valid choices for building complex applications but each of them is way beyond a 'basic web app' scope in my opinion.
If you're really unpatient, I'll click on the first link for you[0]...which reveals the popular frameworks. This is based on real data since it's a survey, not just one or two comments on HN.
Curiosity, one of the project I want to rewrite is an old .net 2.0 using Ajax 1.0 (someone remember that...) having response.write (literally anything)
The idea was understand also how to combine babel and webpack to work with an external api (couple of weeks before create-react-app that you should check in any case)
I'm not using react in production yet, the application I have are full of data entry and very few nice things like stars and likes or profiles with nice icons but
Spend some time on
VUEJS (use their vue-cli)
react (use create-react-app) and check react router.
If you still don't get them after few weeks html and jquery will always rescue you (at least for next 5 more years)
Backend... cause you are learning ES6... you probably want to check
Expressjs
Passportjs
Express session (maybe using mongo as data storage)
But becauseyou also want basic...
Check out
GitLab pages
Github pages
Both have nice solution for static framework.
Good luck with this.new.world.
For database Postgresql is your best bet.
Pyramid has great support for REST API building and I'm just using json renderer to serve the data to polymer components that consume them.
Backend: F# or Elixir
I liked how easy it was to learn Redux. It teaches you functional principles, not only useful for your specific web app but also for your career as a programmer.
By many measures the best and most popular stack would be mysql, php, html, css, and maybe a little jquery sprinkled on top. It powers an enormous amount of the web, it allows very rapid development, and it's about as cool and hip among the hacker news crowd as a cod liver oil enema, and with good reason!
Of course, you can improve it, but you need to figure out what metric you're looking to improve it on. If you rule out PHP or jquery or whatever, then other answers start to look like the most popular.
> Seems like React frontend
React has a lot of buzz, and it widely used for new projects trying to build web apps with heavy client-side functionality. Of course, there's simply an enormous amount of Backbone, Angular 1, or random jQuery client-side apps out there, plus an even more enormous amount "traditional" webapps with minimal client-side functionality (like hacker news). You have to define your search quite narrowly to make React look like the most popular tech.
> perhaps Vue
In the last couple of weeks Vue has probably got more buzz in terms of people talking about it on HN and /r/javascript than React, yes. From a certain point of view that makes it more popular than React; from basically all other points of views it's much, much less popular. Then again, why do you care about popularity? The wisdom of crowds is probably least useful when judging hype-driven popularity contests.
> and Node being the popular backend?
For small hobby projects among people who mostly know JS and have no particular reason to choose anything else? Yes. And low barriers to entry mean it's used in a large number of projects.
On the other hand, in many ways it is an objectively inferior backend. And in others it's objectively excellent. It really depends what matters to you.
> Is there a site that keeps track of [...] how their popularity progresses?
Depends how you want to measure that. You can use google trends, or compare github stars, or npm downloads, or the number of topics posted about it on /r/javascript, and get different answers.
Realistically though...
...none of it matters. Any vaguely functional stack is good enough; the odds of your project failing because you picked Rails instead of Django, or Mysql instead of Postgres, or Coffeescript instead of Typescript is nil. What does matter is that you pick a vaguely functional stack and start writing code.
https://hackernoon.com/how-it-feels-to-learn-javascript-in-2...
This question reminded me of it
* Frontend examples: https://github.com/tastejs/todomvc
So, for example, there are WYSIWYG tools which get like the first 70-80% of the serverside and clientside requirements; and then there's a learning curve (how to do the rest of the app as abstractly as the framework developers). ( If said WYSIWYG tools aren't "round-trip" capable, once you've customized any of the actual code, you have to copy paste (e.g. from a diff) in order to preserve your custom changes and keep using the GUI development tool. )
... Case in point: Django admin covers very many use cases (and is already testable, tested), but often we don't think to look at the source of the admin scaffolding app until we've written one-off models, views, and templates.
- Django Class-based Views abstract alot of the work into already-tested components.
- Django REST Framework has OpenAPI (swagger) and a number of 3rd party authentication and authorization integrations available.
- In a frontend framework (MVVM), ARIA (Accessibility standards), the REST adapter and error handling are important (in addition to the aforementioned criteria (long-term viability, upgrade path)) ... and then we want to do realtime updates (with something like COMET, WebSockets, WebRTC)
Similar features in any framework are important for minimizing re-work. "Are there already tests for a majority of these components?"
Backend: backend as a service like Firebase or Horizon/Rethinkdb. Vendor lock-in is a big concern here but you can get your prototype done so fast with those tools.
Using BaaS things is more like for the prototype/MVP like projects in my opinion.
Edited: though I see title has "basic" word in it, so it's fine.
Do you like HTML-like templating and a lot of sugar? Riot is the way to go. Do you like minimal magic, JS-style templates, and/or Lisp? Mithril is the frontend for you.
If you want just Templating and always open connections for building backend site builder tools then PHP is your language.
If you want free and scalable with as little code as possible with building files you never have to write again then Python Django restful API and angular2.
If you plan for this to be worked on indefinitely and it'll be customized every day and you know the greatest will stay with you with high risk, then vanilla js and nodejs.
If you want as quick as possible but with a scalable price then reactjs and firebase.
CSS ICON: http://cssicon.space - Generate CSS icon.
INITIALIZR: http://initializr.com - Generator HTML5 templates (Classic/Responsive/Bootstrap)
BUDDY GO: https://buddy.works/buddy-go - Git hosting on your server.
LAYERSTYLES: http://layerstyles.org/ - Crate CSS from Photoshop Layer Style.
FFFFALLBACK: http://ffffallback.com - It bascially scans the page’s CSS and creates a clone page where you can test and analyze different fallback fonts.