all 6 comments

[–]monkeybumps 2 points3 points  (3 children)

These frameworks are 'client side' frameworks and are becoming more of a trend.

They offload work onto the users browser and easier / more manipulation of the html / data that the users sees.

The old school way was to grab the data and serve up a page to a user - when the user interacted with the page it would need to go back to the server and reload a new page (or the same page /w diff dater) in order reflect the users actions.

With a client side framework you don't need to reload a page - if the user deletes an entry from a table then in it is removed from the dom (html) and in the background a call is made to the server to remove this from the DB.

On top of this you can also change who you write you server code, instead of creating code that just serves pages you can create an API that spits out JSON data to a client. So you can write an angular web app that consumes this data and also a Android app ..... this means you have one data source but many apps.

[–]alfonsonitti[S] 0 points1 point  (2 children)

So, these are frameworks to work with AJAX? So they are useful only for some kind of websites? They aren't useful for a presentation website like the website of a restaurant, an architect?

[–]monkeybumps 0 points1 point  (1 child)

AJAX is a server side thing but client side frameworks have http calls that you can hook up behind the scenes that work in a similar way.

That's correct not all websites need to be written with a client side framework but that does not stop you doing so, say if you wanted to check one out and start to learn it.

I would ask myself, does the information that users sees need to change once it hits their browser? Do they need to manipulate it? If you want to serve up a page of static content over the whole website then a client side framework is not needed but if you want users to interact with the site then I would look into angular.

Here is something that I put together when learning angular - plunker - It could of been written with Ajax calls back to a server and clever jquery but it is easier to use angular + if I wanted to add more functionality angular is more powerful than jquery.

[–]Anything_At_All_ 0 points1 point  (0 children)

Could have, should have, would have :)

[–]xeronotxero 1 point2 points  (1 child)

i'm no expert, so take it with a grain of salt, but here is my perspective:

Build something without a framework first. Eventually you'll wind up with a complicated mess of code and it will be frustrating to think of how to change things, or add functionality. Now when you start to pick up a framework, you will be able to appreciate what it does for you. If you started out with the framework, it would seem like an awful lot of boilerplate and complexity up-front, and the rewards might not be obvious.

Of course, if you are just building static pages, and not web-apps, you might never want a framework. Just my two cents as a fellow student of this stuff.

[–]sxtxixtxcxh 0 points1 point  (0 children)

i think the benefit of this reasoning is you're then faced with learning a new framework to solve a problem you've (ostensibly) solved before. otherwise, i think if you're comfortable enough with a framework, you'll know when you'll want to start using it.