Only Using Angular for Routing [closed] - javascript

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 working on a single page application and I'm referencing Angular in it. However, the only thing I am using Angular for is the routing (and ng-animate for animating transitions between partials) so that I can change views without reloading the entire page. I don't anticipate using anything else from Angular but I don't know that for sure, as this is my first SPA. I am concerned about things such as load times (especially for international users who aren't near CDNs) as well as security (no point in having potential vulnerabilities if I'm not using those features), etc.
Q: Is using Angular solely for routing overkill? Should I be using something more lightweight?

AngularJS is a framework use it only for routing it's like use a bazooka for a bug ...
I think you need a lightweight library.
The best choice for routing IMHO it's Sammy.js with mustache.js for templating if you need it.
http://sammyjs.org
http://mustache.github.io
Refer to this post :
Comparison between Sammy.js/History.js/Nav.js
Hope it Helps.

Related

How to effectively use the 'application.js' file? [closed]

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 8 years ago.
Improve this question
I am using Ruby on Rails 4 and I would to effectively use the application.js file by stating in it some JavaScript functions shared between my application. For instance, I would like to attach data-* attributes to my HTML tag (as made here) and use those functions "the Rails way". However, since I am new to JavaScript, I do not know how to state functions in the application.js file and how to call those from within view templates.
There are some guides on the web where I can learn more about?
First off, you should only rely on the edge guides if you're using edge Rails (pre-release), because they might document features not present in the generally available package.
This is the same guide for the current Rails version.
Then, to answer your question:
The use of data-* attributes on HTML elements is not a Rails technique, and in fact it isn't related to any specific framework.
While it is true that your back-end (in this case, Rails) will need to decide what to write in those data-* attributes when it generates the HTML response, using them with javascript is something that happens on the front-end, and it's definitely not related to Rails.
In any case, if you are a complete beginner the guide you're reading (ajax and unobstrusive javascript) will only confuse you.
You should start with some Javascript tutorial and read about the asset pipeline to understand the role of application.js in Rails.

Latest Single Page Application framework [closed]

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 8 years ago.
Improve this question
please help me to find out what is the latest framework that fit for developing single page application. Thanks in advance.
Please be more specific when asking questions. :)
If your goal is to augment web-based applications with model–view–controller (MVC) capability,then I recommend you to use Angular js or Backbone js.
You can use Angular js http://angularjs.org/ .AngularJS is an open-source JavaScript MVC framework.
This tutorial http://www.revillweb.com/tutorials/angularjs-in-30-minutes-angularjs-tutorial/ is very good for beginners and it's very easy.
And Backbone js http://backbonejs.org/ is also a good framework.Backbone.js gives structure to web applications by providing models.this http://arturadib.com/hello-backbonejs/ tutorial is also a good one for starters.
If you are struggling to choose any framework please read this article http://readwrite.com/2014/02/06/angular-backbone-ember-best-javascript-framework-for-you#awesm=~oymdu8WAUkUbdV

Frameworks to reuse HTML compatible with bootstrap and knockout.js [closed]

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 8 years ago.
Improve this question
I've been working on a project where we are using bootstrap and kockout.js to handle the views but I'm noticing we're copy'ing a lot of the HTML.
We've tried some options like google closure and JQuery.load but we've had errors with both.
Closure couldn't compile because of bootstrap and Jquery load gave us CORS problems.
As an example, we would like to use "templates" for the navigation bar and for the user control panel that is on every page.
Do you guys know some frameworks that are compatible with our setup?
If you want to use plain knockout there is a template binding:
http://knockoutjs.com/documentation/template-binding.html
Or you can look for DurandalJS. This is a framework which uses Knockout as templating engine.
http://durandaljs.com/
If you use Visual Studio you can checkout the Hottowel SPA template of John Papa. This gives a initial setup for working with DurandalJS.
http://www.johnpapa.net/hottowel-1-1-with-durandal-2-now-available/
Another option you can do is looking in the source code for the template binding to see how the template is injected in the element. You could create a new binding based on the template binding with your own loading meganism.
After a quick bing I also find a nice blogpost about lazy loading templates, which is worth a look:
http://blog.vosnax.ru/2013/06/03/Knockoutjs-lazy-template/
You should try Angular in my opinion. It offers a simpler template structure than knockout and allows very easy JSON calls to web API's
http://angularjs.org/

What are some Angularjs based client-side frameworks? [closed]

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 8 years ago.
Improve this question
I want to build rich Angularjs based applications, but I don't want to invent my own framework if I don't have to. I need something that can organize and watch my Angularjs code, which I'm writting in coffeescript, auto-compile and link separate modules by convention over configuration. This isn't going to be framework that is concerned with building anything that has to do with server side code. This is purely a frontend framework. I'm not looking for server side frameworks like sails.
While angularjs is a "toolset for building the framework most suited to you". It sounds more like you're looking for a development stack.
There are a lot of pre-compilers, task runners, development guidelines (not in any particular order of favoritism)
webpack
es6 and the traceur compiler
yo-grunt-bower
requirejs and r.js
anything you want and the tools provided with:
grunt-contrib
gulp or
broccoli
While most of these are collections of tools to help you do what you want. Things like yeoman give you a nice baseline you can add to, ie -> throw a coffee-script compiler in your grunt workflow.

Are there any full stack server side javascript frameworks available? [closed]

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 8 years ago.
Improve this question
I see that javascript is becoming more and more practical as a server side language with the advent of node.js and v8. As far as frameworks go, most of what I've seen are minimalistic frameworks. Even express.js, one of the more promising ones, is a little bare.
Are there any full stack server-side frameworks out there for JS yet?
There's RingoJS, the current form of the (surprisingly old) Helma framework. It's a Rhino-based implementation, so you can get whatever you want from the JVM (sort-of a "good news/bad news" joke I guess).
Check out towerjs and railwayjs.
There is a very powerful webapp stack called ringojs. It is actually a Rhino prompt that you can use to run javascript modules. It is based on Jetty and features a well designed set of modules and a powerful but simple template engine (including inheritence and macros). You can reuse the galaxy of Java libraries out there throught simple Javascript-Java interop. Coming from J2EE development I threw out a lot of ceremony code and configuration - it is very productive, especially tweaking your running webapp throught the prompt

Categories