views:

83

answers:

5

If our website's backend is expose via apis (secured and everything) , is it a good idea to develop the website only in JQuery?

Like one commenter said, JQuery will be calling the API's.

Edit again: The entire idea behind this is to achieve scaleability. For example, the same api's could then be used on Mobile or something else.

+6  A: 

jQuery is only a java script framework. It has nothing to do with exposing your backend as api's.

*EDIT*

After looking at other peoples response, may be you are talking about developing the front end only for a web application whose back end is already exposed as api's. In that you can do that using jQuery. But it would definitely be not a search engine friendly and not accessible completely and not usable for people who don't have javascript enabled.

Teja Kantamneni
It sort of does, because when you have all the backend api's in place, calling them from jquery may seem like a viable solution.
tdammers
@TDammmers- Thats excatly what I am trying to do @Teja- I have updated the question.
Faisal Abid
@Teja- Why would it not be Search engine friendly?
Faisal Abid
Teja Kantamneni
A: 

there are many options for developing a web application around an API. JQuery is only one option. The answer depends on what you are trying to accomplish...

hvgotcodes
+4  A: 

If you're asking whether you can develop a complete client-side application that uses jQuery (or any Javascript for that matter) to call all of your back-end APIs via AJAX, etc, you certainly could.

I wouldn't recommend it though, as it would completely cripple your entire site for users with Javascript disabled.

Pewpewarrows
+3  A: 

If the website's primary purpose is to present content to the world, then I'd strongly advise against such an approach. Not only will you lock out users who cannot or will not enable javascript (think audio browsers, people with really really old software, sub-smartphone mobile devices, etc.), you will also effectively hide all your content from search engines.

If, however, it's a web 2.0-ish thing that resembles an actual application more than a content-presenting web site, then programming it in javascript might be a viable solution - but again, you'll miss out on search engine hits and javascript-agnostic users.

Also, note that there is nothing stopping you from calling your api's from server-side presentation code (ASP.NET, PHP, JSP, whatever you fancy).

tdammers
That makes sense. I did not know that if i use a server-side language , the search engines can pick up the data but If i use js they wont be able too. Thats interesting.
Faisal Abid
Think about how a search engine works. It sends a crawler around, downloading the HTML from all web sites it can find, and analyzes them for keywords and links. For a fully javascript-based site, your HTML doesn't contain anything interesting, just the overhead required to bootstrap the javascript application. Most search engines do not, to my knowledge, run javascript embedded into pages.
tdammers
+1  A: 

Just leaving this here, but a while ago I read a nice blog post about the very issues you are dealing with.

Check it out: http://omergertel.com/2010/08/05/on-websites-apis/

Yuval A
While all the other answers where phenomenal, this link you posted described the problem and solution in depth. Thanks so much!
Faisal Abid