Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Front-End Technology in 2014
11 points by mittermayr on Feb 6, 2014 | hide | past | favorite | 7 comments
Feel free to disregard this thread and move to the next. But for those starting new projects in 2014, this might be highly valuable.

This is a very dangerous question, I fully understand that this might very well explode into a thousand directions and would most definitely be shut down on Stackoverflow right away. But me searching the web only returns unweighted link lists that I do not nearly value as much as opinions on here.

In 2014, what's the status-quo on best-practices for front-end development, API-based, moderate traffic (10k to 200k daily visits) websites, with authenticated user dashboards?

I've been doing this since Perl/CGI times and have evolved through technology and done every and anything from html/html5/php/yii/js/perl/ruby/rails/python/django/angular/css/css3 and whatnot throughout the years. I feel most tools can get the job done either way, some are more comfortable, some are more reliable, some are more flexible, some are more resistant against high traffic.

If you would go about creating something like a small Google Analytics front-end, which fetches ALL it's data through a private API backend (JSON) and has user authentication to reach those dashboards/analytics --- what would be your weapons of choice, and why?

And please, don't pick by passion only (looking at you, Haskell, Scala, Go guys) - don't forget your business objectives - developer scarcity/availability, failure-recovery (and knowledge thereof), long-term experience with stability and maintenance resources on the web, etc.

Go!




I'll give it a start, my current set of tools for this objective would probably be:

Light-weight PHP front-end (epiphany, minimal framework) for user authentication against MYSQL database that just holds user data and nothing else. CSS3 + HTML5 templates, dynamically rendered/finalised on-the-fly through AJAX calls and JSON data that gets filled into those templates through JavaScript. Hosted on a root or virtual server. Can be scaled by duplicating servers (possibly even EC2) and load-balancing if necessary. Though a good root server handles 100k users a day without a hitch.

Alternatively: Javascript+HTML5+CSS3 hosted on S3 and authentication run through the API backend. Traffic-immune, deployable anywhere, easy to test. Minimal cost. Might feel odd to the user though, when everything just clicks/works instantly (look how far we've come).


Back-end I would pick something super popular where solutions are well known and developers are a commodity. I would pick Java and whatever the best of the REST APIs is. Use that with some of the most popular database ORM tech, etc. It's easy to find people and you can find those who know how to make it fast.

For the front-end I'd pick AngularJS personally. I used Backbone.js for a couple of years so I know what that world is like. Ember.js might be a good choice as well but it seems like AngularJS is going to swamp it due to popularity.

I wouldn't generate any pages in the back-end at all (the exception being a couple of one-off servlets if I have binary files or other things to download which are more easily generated in the back-end). All pages would be static HTML, CSS, and JavaScript and rendering would all happen on the front-end.

It's easy to work on, it's easy to figure out where bugs are (just look at the JSON flowing back and forth), and if you focus 100% of your security on that API and making sure that you never send anything you shouldn't to the front-end and that you validate everything the front-end sends to the back to the n-th degree, you'll never have security woes.


On the server side, I think it's time for the lightweight web frameworks to shine - like ruby's sinatra/padrino, python's flask and equivalents in your language of choice.

On the client side, I think everything still falls in 2 camps - Backbone for the minimalist, Angular/Ember for the rest.

I'm hoping the web makes progress on the shadow DOM soon, so we can get a higher level of client side encapsulation.


Backbone for the minimalist? Wat

Angular/Knockout is minimalist.

I do agree with you on the shadow dom thing tho. React looked fantastic though I have yet to have a proper project that would need it


I'm interested in what people would recommend for beginners, I have made static sites and some templates powered by flask/django/web2py/rails/sinatra but i have never used js - any guidance would be appreciated!



How to login any app online ? - trick




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: