Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to develop a website using JavaScript/HTML5/CSS3, because it is more flexible in UI. I read internet about AngularJS for the client side and about NODEJS: it can be used to both clent side and server side.
Can anyone kindly inform me about the cons and pros of the following:
use AngularJs for client side and other language for server side (EX : PHP ).
Use NODE.JS for build website
or can I use both?
If you want to check for pros & consof Angular only, here is the list:
PROS
Angular follows MV-Whatever architecture. Hence you can either MVP, MVC or MVVM.
It gives the flexibility to do two way binding. Data binding tries to get rid of writing codes manually by relieving the backend server from creating templates. MVC pipeline is also maintained by the framework itself.
DOM Manipulations at one place: You can make use of angular directives to play with the dom giving a neater code.There are some reusable tags defined by angular folks themselves in directives like ng-class, or ng-show. See Angular Directive Documentation
Test Ready: The fact that AngularJS comes linked with Dependency Injection (DI) makes it ready for unit testing by injecting mock data into controller and measuring the output and behavior.
Ionic Framework: Ionic Framework is written on top of Angular and is mainly used to build hybrid apps. So Angular is useful if you are going to extend your website into a mobile hybrid app.
Cons:
Difficult to adapt the existing code: AngularJS requires the developer to re-implement the entire transformation code which makes it extremely hard to play around while adapting existing code.
Heavy: Their are lighter frameworks like backbone and knockout, however seeing the power of Angular it can be easily negated
Now moving to your question whether Nodejs be used in conjunction to Angularjs my answer to it is:
AWESOME COMBINATION
You can have your server code residing in nodejs and use angularjs at client side keeping the architectures completely different. Since Nodejs also uses javascript there would be less of uptime for developers to learn it and start developing. Infact MEAN (Mongo-Express-Angular-Node) methodology.
Their are various boilerplates available in order to kick start your development. One can be found at MEAN
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
Im new in Web development and i try to improve as much as possible in ASP.NET MVC. Right now Im looking for good javascripts frameworks, that I can use in my projects and I found two options :
angular - right now we waiting for version 2.0
knockout
Already I know how to use jquery, bootstrap and materialize.
Could someone help me, which one framework should I choose to learn right now? Is knockout still worth learning or should I learn 1.x angular version and wait for 2 or maybe should i learn another javascript framework?
Thanks for every answer!
A quick google search gave me this,
Angular.js is the front-runner of the JavaScript frameworks, and is one of the most popular JavaScript frameworks out there.
Angular.js was released in 2009 by Google, and no one would have guessed that it will become so popular in the near future. Angular.js gives the power in the hands of the programmer and lets them build single page web apps.
Backbone.js is minimalistic JavaScript frameworks that aim to provide the necessary backbone to a web application. The framework is open source in nature and is available under the MIT license.
React.js is one of the most popular front-end JavaScript framework.
Why Front-end? Becuase it can easily used to create the UI part of your project. In simple words, it acts as the V in MVC. The magic is achieved by using a virtual DOM and it can also be rendered on the server side with the help of the node.js.
Knockout is a MV (Model – View) Javascript Framework which specializes in easy declarative bindings, automatic UI updation (on change in the model state) as well as powerful templating features. Knockout is built on pure Javascript, without any external dependencies. It also happens to work on most browsers.
there are many other great names in this list,
First of all It all depends on your project requirements to use any framework
but for learning purpose i would suggest starting from jquery
You can start your learning from jquery and then you can extend it to Angular or Knockout these two are very much popular these days and are very helpful for developers.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How can I start in BackboneJS, if I have a jQuery background?
If I am familiar with developing client-side applications in jQuery, but now I want to start with BackboneJS. So can you describe the pattern or model(paradigm) which is necessary ?
Below are some questions that might help you make an answer:
How can I architect and design client-side web applications in terms of JS?
What are the Do's & Dont's?
Is there any server side restrictions for which I have to pay more attention?
I am not seeking for a detailed comparison between jQuery and BackboneJS. I just want to start with Backbone and want to build and think any application in terms of architectural design.
Here is what I find most useful for up and running with backbone.js: Lynda.com Up and running with Backbone.js with Joseph LeBlanc
I think this is the best way to get started with backbone.js for one who has previous experience in Javascript/jQuery. The duration of the course is 1h33m. And here are the contents:
Backbone helps you separate DOM manipulation from the data powering
your web application. In this course, learn how to use Backbone
models and collections to manage your data, while displaying it
through views. Author Joseph LeBlanc shows you how to use events to
change an application's state and avoid messy nested callback
functions. He explores modifying resources on the server side via
models that reflect the changes in your application, tune your
application's performance, and keep the JavaScript environment clear
of excessive global variables. He also covers supplementary tools
based on Backbone that provide additional functionality.
Topics include:
What is Backbone.js?
Starting a node server
Building routes
Creating views
Reusing views and building view templates
Defining models
Loading remote data
Organizing collections
Adding and removing models
Saving and deleting data
Bootstrapping data
Finding Backbone resources
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
In a single-page application that uses Angular, it seems like most of the things are handled on the client-side. The client seems to just make restful calls to the server.
Following this concept, it seems to me that my server-side will not have any application at all, but only scripts that generate RESTful json data for the client to read.
Perhaps frameworks like Hibernate or those that connects to the database are still relevant since the restful scripts on the server are going to still have to connect to the DB. But what about those MVC frameworks?
Since in a single-page app the server is only required to serve RESTful calls for the client, frameworks such as Spring, Struts (in Java) or Laravel (in PHP), etc, they all are not relevant to SPAs? Which means the server side will probably just need a good RESTful library that we can work with to serve the json data and that's all? Otherwise, what would the views and controllers be on the server in a SPA?
I think that the MVC frameworks are still useful into an SPA application. I am developing a SPA application, and I am using ASP .NET MVC for two things:
To Manage the first page of my application. It allows me to make use of the advantages of this framework such as the facilities for managing joining and minification of scripts.
To return the partial views that I am using in Angular. It allows me to use the razor templating, and also to manage how the partial views are catching.
I think that you can get some advantages if you mix the two things.
I hope that it helps.
if your view and navigation logic its in the client and your server "only" needs to respond to HTTP call (RESTfull probably), what things do you need on the server side:
A way to map urls with server services.
A way to produce a json (or perhaps other formats) output.
Your regular business logic and data-access logic if you need, this its the same that always.
Probably with a good Rest framework like jersey its more than enough, i'm playing a bit with dropwizard (http://dropwizard.codahale.com/) and by the moment i'm really happy with this simple framework.
It is still relevant, however, the view in that case is the mechanisms, producing JSON/XML and it can be implicit.
Spring REST in that case with the underneath controllers is the an example of such. You still need your Application Services will still manipulate on the Model that you will get from some sore of persistency mechanisms, accessed through DAOs.
The architecture is the same, just the data representation in the view is different.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Now I don't have any specific question, rather a general, ask for opinions post.
Within a month we will receive the documentation of a project we have to develop. The website has a lot of potential and will be advertised in TV and radio as well when it'll be done. So it'll have a lot of visitors, members and it'll have a rich admin panel with lots of options. My friend who was asked to be the CTO is a senior PHP developer with almost 10 years of experience and I am a junior JS developer. (or less, I don't have years of experiences in JS, but I'm committed)
Is a JS MVC framework substitute for PHP? Is a PHP MVC framework substitute for JS? Are they both working well together or is it possible to not use any framework, but write the project in MVC approach?
For example:
model: PHP
controller: JS (jQuery+Ajax)
view: HTML, CSS
As my friend is a professional PHP developer and will have a daily job next to, but only in the beginning of this project, he doesn't really want to learn an other language (like Node.js), because almost everything is a routine for him now in PHP.
I know everything depends on the documentation and what we have to develop exactly, but I'm just a curious mind and want to understand more. I know I have much to make up and sometimes I worry of my current knowledge, but then I think that be whatever big the challenge, there will always be a solution for it.
MVC does not mean to use differenct languages for all of the modules (model, view, controller), but to loose couple and encapsulate certain parts of your application.
Against many opinions, MVC is not the panacea for application development. It really depends on the application you're developing.
It's not necessary to use any frameworks in order to follow the MVC approach. In fact it's a pattern that can be tied together very quickly, in it's most basic form.
If you decide to use your backend as an API and pull the data via frontend, you don't need to use MVC come hell or high water. For an API for example it's not necessary to perform most of the view tasks. Instead you should care about building a performant and scalable data storage layer (which for example is able to easily provide your data in many common formats, such as XML or JSON) and a strong router that can handle HTTP Requests nicely (See if REST is something for you).
In this case you want a strong frontend which can handle templates, and also has a strong layer for obtaining, sending and handling data in general. A strong controller layer that can delegate tasks to certain parts of your application would also come in handy.
Well you see what I'm talking about. It really depends on your application. In my example the backend wouldn't exactly follow the MVC approach, while my frontend would completely. MVC isn't about switching programming languages for certain parts of your application. Instead it decouples your application structure making things a lot easier.
Of course Frameworks come in handy when developing such an enterprise scale application, but it's not necessarily required.
To sum things up: MVC has not much to do with the code itself, it has much more to do with architecture and structure of your code. How exactely you're implementing it is absolutely up to you.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm looking to build a web app (online simple game) with javascript / HTML5 but I want a structured code.
I have do some research and Angular look like a good MVC framework.
http://angularjs.org/
Have you see other framework ? Angular is it a really good framework ?
Thanks
Edit:
Maintain javascript code is not easy and quickly becomes unreadable without an architecture that helps to develop properly.
I have a simple little web project, players are by team and have some kind of action that infuence the actions of other players.
I want a framework that allows to manage all data easily.
A little way to flex and AS3, ca would be to create the component and integrate easily into the html code.
Backbone js seems to be effective for the data binding with epoxy.
or http://docs.angularjs.org/guide/dev_guide.templates.databinding
I'll do more research because my question is too broad ...
I think this is a very broad question that simply choosing a particular library won't solve. AngularJS is great, but I think it's important to understand how to scale a javascript application. Here is a video of a presentation given by Nicholas Zakas. http://www.youtube.com/watch?v=7BGvy-S-Iag
Another good resource http://addyosmani.com/largescalejavascript/
Knowing these concepts will allow you to build an application that is capable of dropping modules in and out seamlessly. You will be able to change a module without affecting any other module because your program will be loosely coupled. Additionally, should you choose to switch from Angular to something else, this framework will allow you to swap the base library easily and without breaking very much of your code.
Also, using modules and a mediator will make your code easier to test. Testing is important in any non-trivial application. I hope this helps!
If you're looking to just quickly create a web server that can serve your javascript application, I highly recommend Rails. You can get a server up and running in just 15 minutes. Another good MVC framework is NodeJs with Express. Almost as easy to use as Rails and it's purely Javascript whereas rails is Ruby.
Here is a list of common MVC frameworks and you can choose one based on the complexity of you app and data models.
List of common MVC frameworks
if you really want to build a structured App using Angular Js Use the directory structure of ng-boilerplate