Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm a PHP programmer that was just hired to write an interactive ipad app whose requirements are basically that it be a website. So I started setting up to develop a website when I found out that my employer's server has been lobotomized: no dynamic languages, the only things I'm allowed to code with are HTML and JavaScript.
AJAX and jQuery are still in, but as far as I can tell they won't have a server-side language to back them up. If I have an urgent and compelling reason to have an active language, I might be able to convince the senior web guy to give me an exception, but I don't think my project qualifies as urgent or compelling by about two orders of magnitude.
My question then, is what sort of labor-saving devices are out there for HTML/JS only sites? I would have liked to use something like Drupal. Would I be better off writing the whole thing in XCode?
The site will display information regarding a number of historical artifacts in the possession of the library that is my employer.
It would help if you were more specific about your needs (the kinds of things you do in PHP that you don't know how to do with just HTML/JS), but I think I know what you're getting at.
If the site isn't too complicated, a good client-side templating engine is probably what you're looking for. Handlebars.js is a popular choice, but there are tons to choose from. I prefer to use client-jade, but it doesn't matter much. The idea is to define a template (e.g. for displaying one historical artifact), then iterate over an array of data that describes all the artifacts in the library, rendering each element of the array into some pretty-looking DOM with your template.
If you need something more sophisticated than that, you might want a client-side MVC framework like Backbone.js (lightweight, easier to learn, less opinionated) or Angular.js (heavier, harder to learn, very opinionated).
If the labor you're trying to save yourself from doing is styling work, you might want to check out twitter bootstrap (or similar frameworks like foundation). Bootstrap makes it easy to create good-looking navbars, make column-based layouts, and ensure that your site looks good across different browsers and devices.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm building a large web application with a lot of JavaScript and jQuery (ajax is also inside). There will be a database too with several tables and I use mySQL to manage it.
My question is which server side framework should I use. Right now I consider Rails and Node.js with libraries.
I am aware that there are couple of similar questions on stackoverflow but all of them are quite old. I assume that over a year or two things may change.
If you are building a large application with a lot of javaScript, I am assuming that you have a good understanding of the language. My advise is to stick to javaScript.There are a lot of good javaScript frameworks that are pretty good and can handle large application. Some of the Frameworks you can use are AngularJS, EmberJS and BackboneJS(the most popular). And with the MEAN stack(Mongo, Express, Angular & Node), which is a Fullstack javaScript framework, it will accelerate your workflow.
It really is up to you what language or framework you want to use. You can use rails if you want to delve into ruby or if you like JS everywhere use node. If you want to stick with PHP you could use cakePHP. A lot of the frameworks are similar in that they follow MVC design. All your tables for models, views, and controllers would follow similar conventions in each framework I'm guessing. If you are already good with a language I would just stick with that then branch out if you are pressed for time. You can't really use PHP code with Rails or Node or at least it's uncommon.
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.
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
There are a lot of "buts" in approaches to web development. Recently I've read an article
why not to use Twitter bootstrap. One of the reasons were that it doesn’t follow best practices. Well I don't want to discuss about TB. What I wanna know is how is it with Modernizr - it looks like that has a lot of advantages, but what about dissadvantages? Is that also redeemed by using bad programming practises on web (like these mentioned in twitter bootstrap)?
By good practices I mean ideas which are connected with Html5 and CSS => this is not opinion based question - I'm basicly asking if Modernizr is in contrary with these ideas.
Modernizr itself tries to follow best practices as best as possible, however there are a few things that it does that aren't necessarily "best practice"
it basically requires being loading in the <head>. Since one of the main uses of Modernizr is the css classes that are added, you actually want it to block the rendering of the page until after it has ran. If you load it in the bottom of the page (which is the "best practice" for javascript, generally) and rely on the classes it provides, you would see a flicker between the non-support and support versions of your styles as it runs.
It can be heavy. There are ongoing discussions on the github issue tracker about how we can improve the execution time of the library, as well as new preposed updates to the lib that would group tests to increase speed
Not only that, but it can be used poorly. One of the most common issues is that people deploy their public website with the debug build of Modernizr - the one that includes ALL of the tests. This means running very large amount of javascript that never impacts your site.
Other than that, modernizr tries very hard to help define best practices, let alone just follow them. If you ever find there is any issue what so ever, I would really encourage you to open up an issue on the github repo to help us move the internet forward.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am writing a lot of web applications that requires a lot of dynamic content that is replaced according to various ajax request to the PHP+mySQL backend that is able to respond all data as JSON. This could be something like quizzes, polls or it could also be more advanced applications that requires more updates of the DOM.
The point is that the integration with the HTML (wich is coded by a third part) is as easy as possible.
Since this are many small applications and not a big site, I am looking for a library that helps me get the job done fast and easy to customize later on.
I don't know the best way of doing this but know that there are various libraries out there that does what I need (and a lot more).
Required features:
Lightweight
Easy to update the HTML structure (even for HTML-only coders)
Compatible with jQuery
Works with all modern browsers including Chrome, Firefox, Safari and IE7+
Works with all mobile browsers including Android, iOS and Windows Mobile
I would try Distal.
You said your HTML is coded by a third party so you would want minimal changes during integration. With distal you add stuff to the existing HTML and don't need to move things around.
The syntax is HTML based so it's suitable for HTML only coders.
Mustache is pretty solid, but I found it to be a little too hardline about the "logicless template" thing. For example, it doesn't offer a lot of small niceties you'd hope for in a templating system, like an "else" statement. You have to do dumb stuff like this all the time:
{{#if foo}}
<span>foo is set</span>
{{/if}
{{^if foo}}
<span>foo is not set</span>
{{/if}}
Instead, I'd recommend Handlebars which is built on top of Mustache, but adds some nice features like custom helpers and better context-switching support.
I would try mustache. I've used it in the past and it's pretty good; fast and intuitive.
Try JUST. It has similar syntax with EJS but more it powerful. It have very useful features like inheritance, partials and block redefenitions. It work on client and server (node.js) side.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Many languages have standard repositories where people donate useful libraries that they want others to have access to. For instance Perl has CPAN, PHP has PEAR, Ruby has RubyGems, and so on. What is the best option for JavaScript?
I ask because a few months ago I ported Statistics::Distributions from Perl to JavaScript. (When I say ported I mean, "Ran text substitutions, fixed a few things by hand." I did not rewrite it.) Since I've used this module a number of times in Perl, I figure that statistics-distributions.js is likely to be useful to someone. So I've put it under the same open source license as the original (your choice of the GPL or the Artistic License). But I have no idea where to put it so that people who might want it are likely to find it.
It doesn't fit into any sort of framework. It is just a standalone library that gives you the ability to calculate a number of useful statistics distributions to 5 digits of accuracy. In JavaScript.
JSAN (JavaScript Archive Network) sounds like the kind of thing you're looking for, but I've never personally used anything from it apart from Test.Builder.
As long as your JavaScript can be dropped in to people's projects without polluting the global namespace or doing things which are liable to cause breakage in other people's code (adding to Object.prototype, for example) I would just stick it somewhere like Google Code as already suggested.
There is no centralized repository for JavaScript. JS Libraries usually have their own plugin-repositories, but for stand-alone scripts, The best way to promote it is to send it to famous website such as ajaxian or mashable
AFAIK, there is no central JavaScript repository, but you might have success promoting it on Snipplr or as a project on Google Code.
You could start a project on SourceForge to contain useful snippets of code like this (or google for snippets to find one).
Perl, Ruby, PHP, etc all have distribution mechanisms built into the language to consume such libraries.
There's not such a thing built into JS.
There are tons of script archives out there - but no "central" JS repo.
Consider packaging it up as a plugin for one of the major Javascript libraries such as jQuery - see http://docs.jquery.com/Plugins/Authoring for more details. This way it can be included on their plugin page which will get it good exposure as they have a huge developer base and it'll be one of their first ports of call when a need arises for such functionality.
Whilst jQuery is one of the most popular frameworks (if not the most) out there, there are a host if other libraries you could consider using in addition to/instead of it.