Promising alternatives for javascript framework? [closed] - javascript

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 9 years ago.
Improve this question
Popular JavaScript frameworks/libraries like jQuery, MooTools, Prototype, and YUI (to name a few of the most popular JavaScript frameworks out there) definitely have a solid foothold in the JavaScript framework arena.
But for the more adventurous developers looking for new or alternative frameworks/libraries, there are options like:
SproutCore
Spry
JavaScriptMVC
qooxdoo
midori
Archetype JavaScript Framework
June Framework
UIZE
SimpleJS
Fleegix.js
Each one has its own merits. But which is preferable for what over which?

I think server-side javascript has an exciting future.
Things like node.js and jaxer might pave the way for an environment that makes a compelling argument for writing an application strictly in javascript. There's a lack of frameworks right now, and a lack of general javascript libraries (for things other than traversing the DOM ;) but that might change.
I can't tell you how many times I've wished I didn't have to port over various bits of model code to javascript, or resorted to RPC style requests just so I don't repeat myself. I can port the drawUserVcard() function to javascript (say, from Python) so that I can generate a vcard dynamically on the frontend from json data, but then I have consistency issues because my ported code needs to track the original Python generated result.
Aside from server-side "don't trust the client" operations, a lot of processing can be offloaded to the user. Why print HTML in Python/PHP/Ruby? Actually, none of those languages have an API as nice as jQuery for HTML manipulation. Why query a database in Python just so you can generate some json that you pass off to your client scripts? Why not just read json data directly (CouchDB) from the database and let the client hydrate it.
There's so much room for improvement here.

Related

What does it mean for a framework to call you? [closed]

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 2 years ago.
Improve this question
My goal is to fully understand the differences between a library and a framework
I have been able to have a basic understanding of the differences between the two. Except for one basic description that is commonly given out:
"The key difference between a library and a framework is "Inversion of Control". When you call a method from a library, you are in control. But with a framework, the control is inverted: the framework calls you"
programcreek.com
What does it mean for a framework to call you?
I have done research on what it means to call a function, method, etc. and now have a full understanding... But I am not able to comprehend nor find any information on what it means for a framework to call you
I have tried looking this question up with multiple different ways to frame it and all I am able to find is: MFC Framework how a framework calls your code. I am not able to find anything in the realm of languages or frameworks I am familiar with
Arguably any sufficiently complete library is indistinguishable from a framework. By inversion, any sufficiently thin framework can be treated like a library.
In simple terms, the more a library dictates how you code, what practices and conventions to follow, and how to organize your code, the more it resembles a framework.
The "inversion of control" is something that doesn't necessarily happen in a clean-cut way. Some frameworks are very light in that they don't force a lot on you, that you can yield control incrementally. Others dictate strict terms, that you either do it their way or you don't do it at all.
There's a huge spectrum here of framework-like-libraries and library-like-frameworks.
When a framework "calls" your code, it usually means that you've followed the patterns laid out by the framework itself and your code slots into pre-defined locations in that pattern.
That's not to say libraries don't call your code as well, they just impose fewer constraints on where, when and how that happens.
So here's a library call:
// Tell the library to perform a user registration
let user = FancyLibrary.registerUser(...);
Here's a framework-like structure:
// Start up the framework and ask for notifications if/when a particular event occurs
let app = new SuperFramework({
onRegistration: user => { ... }
});
Though there's often a blurry line here. Some situations are very clear, but there's a lot of toolkits that have strong conventions, even if they are libraries.
For an example of something that's sort of in the middle, consider Sequelize which is an ORM. Is it a framework? Most would consider an ORM to be similar to that, it has strong conventions and so on, but it's also a library that can be used to make simple SQL calls, nothing more. It's hard to say exactly what Sequelize is other than a robust toolkit that can be used to perform complex tasks.

Java script and full-stack JavaScript difference? [closed]

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 5 years ago.
Improve this question
What is difference between JavaScript and full-stack JavaScript.
Both are same or not.
Full stack - in simplification - generally means Front-end and Back-end. You can do backend with NodeJS, and do frontend with frameworks like React or Angular. All with Javascript.
First off, JavaScript is a programming language, no matter if it's used in the browser, on the server or compiled into apps and desktop programs.
Generally, as #Tomasz wrote, with full-stack people refer to developers that can develop on all (or at least multiple) platforms, but it's still the same language. The difference lies in the usage of certain special bits of (third-party-)code.
Node has packages and many platforms (like electron) use those to accomplish their usage of the language.
On the frontend you'll likely find frameworks that make it easier to interact with what the user sees.
So to answer your question, yes, both are the same language, but they are not the same thing.
Full stack: Backend(Server Side) + Front-end(Client Side)
Backend Technology: NodeJs (Role of Backend Technologies)
Front-end Technology: React Js, Angular Js etc. (more)
For More Detail read the following URL:
Is it possible to write the backend using JavaScript?
https://airbrake.io/blog/javascript/javascript-frameworks-love
http://thefullstack.xyz/full-stack-javascript-developer/
https://www.smashingmagazine.com/2013/11/introduction-to-full-stack-javascript/

Which forms of JavaScript for intermediate-level Rails developer, only dev on team? [closed]

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 8 years ago.
Improve this question
I am acting as web developer for a small startup, taking over as the only in-house developer to maintain and adapt the application that was initially put together by a team of contractors. I would consider myself to be at an intermediate level with Ruby on Rails. I know enough about front end technologies like HTML and CSS to use Bootstrap or Foundation effectively and write my own tweaks when necessary. However, I only can read the JavaScript code of other developers well enough to make small modifications to what's already in place.
I would like to become proficient in JavaScript to help round out my skillset but there seem to be a lot of JavaScript "options" out there and I'm not sure what's on the way in, what's on the way out, what's popular, what's most useful, easiest to start with, best fit for Rails applications and so forth. And by "options" I mean "regular" Javascript, jQuery, Node, Angular, etc etc.
In hopes that my question will meet SO terms as "answerable" I'd like to focus on the question of what kind of Javascript fits best with Rails and which technologies are the most generally relevant today (i.e. not on the way out of popularity already).
Your choice should depend on what you're doing. One case might be using Rails primarily on the back-end, pulling data from it, and then generating your markup and displaying content primarily on the front-end with JavaScript. In that case, you should look into a JavaScript framework like Ember.js or AngularJS. If you're going to be generating your markup primarily on the back-end with Rails, having that markup being pre-populated with content before being sent to the user, you might be better off using jQuery for DOM manipulation and the occasional AJAX request to your Rails back-end.
In the case you're looking for a framework: Yehuda Katz is a leading voice in the Ruby on Rails core team, and has a similar role inside of the Ember.js project. While this isn't strictly objective, I'd say that Ember is the JavaScript framework that most closely matches "The Rails Way". That said, any framework will integrate well if you're using Rails as a backend, and AngularJS is currently more popular and might be easier if you're looking for examples and helper libraries.
I'd like to point out that Ember is just a framework, just like jQuery is just a library. Knowing JavaScript from the bottom up is a very helpful thing when working with anyone's code. I highly recommend checking out the Learn JavaScript page on MDN, and maybe picking up a copy of JavaScript: the Good Parts by Douglas Crockford. The former has a bunch of free information about getting up to speed on JavaScript. The latter is a dense, and somewhat controversial book, but (in my opinion) is one of the best books about dealing with the language's rough edges.

MySQL vs JSON vs Firebase as a database option [closed]

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 8 years ago.
Improve this question
I am currently developing a site to track credits gained from exams, and how these stack up against the user's goal credits.
I know JavaScript fairly well, but don't know any PHP.
What would be the best option to use as a database? Please, I am a beginner and I will be getting answers from advanced programmers. To me, your opinions count so please don't close this as asking for opinions.
MySQL
I could use this on a PHP site, but it would involve me learning PHP. What are the benefits and would they outweigh the hassle of learning a whole new language?
JSON
Would it work if I used JSON files for data storage, and used xmlHttpRequest() to read and write information?
Firebase
Would Firebase work as a fully operating database?
If you know javasript very well and aren't willing to learn a new server side language, I would recommend using Firebase. They way it works is very similar to if you had built your own REST api and just made ajax calls to it.
I wouldnt recommend using json to store data. Anytime you want to read there would be more data sent over the network than necessary and when you get enough data it would be impractical. Databases exist to avoid storing data in a file and simply reading/writing to the file.
Using php wouldnt be the best idea. It is a very powerful language, but it is incredibly easy to write major bugs with it. If you were to use it I would recommend learning a web framework because it would fix most of the bugs that you would write yourself. Heres a list of a bunch of php frameworks http://www.phpframeworks.com/. I think that there would be more benefits to you actually learning php. For starters, every developer should have more than 1 language in their toolbox. You should be able to approach a problem and know what the best way to solve it is and that starts with the exposure to different languages and technologies. Learning another language will take a decent amount of time, but you will get much more out of it than releasing your site a little bit earlier.
So to sum it up, I would use php(or any other scripting language for that matter) with a web framework. Your site would be more secure with the web framework and you will become a much better, more valuable developer by taking the time to learn something new.

Uses of javascript, not just for aesthetics but uses on the server side [closed]

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
I have read this article (Uses of Javascript), while it is right I know there are other uses of javascript, modern javascript nowadays. I haven't read about node.js and how this one works but I have heard that this one makes js do server-side stuffs?
The question is, what are other uses of javascript, can this replace php and ruby? I know this might not be a good idea for enterprise applications but will work well with medium-size applications, am I right?
What are the other uses of javascript other than the one given in the article?
Javascript can very well be used server side. If you're on an IIS server, you can for example use JScript, nodejs, v8cgi (currently known as TeaJS), or a combination of these. On *nix servers nodejs is a popular framework. Nodejs can even be used to program your own webserver (e.g. using the expressjs framework).
Dive in the given links and see what's possible.
There is TESSEL and Espruino javascript inside microcontroller.
I use Node.js for web application for few years, few projects and really happy so far.
The Express.js + MongoDB makes a perfect match (exactly as PHP + MySQL, 5 years ago). You can find reference on MEAN stack.
It works good no only for small applications. We have medium-size app that could be easily scaled up.
Node.js is not to about substitute PHP or Ruby, but what's happening now is indeed, it's more and more used for web applications nowaday. The reason is simple, Node.js has "web-oriented" core, meaning it's originally created to aim highly productive tcp/http applications. With some progress beautiful web development frameworks appeared on top of Node.js that makes web application development even more easy and fun.
For me, programming Node.js on server makes a lot of sense, since JavaScript is main client-side language (almost without alternatives), so context-switching between client/server programming is less. With practice you get use to some initial JavaScript weirdness and things goes smooth and nice.

Categories