{"id":1127,"date":"2014-10-30T13:25:52","date_gmt":"2014-10-30T11:25:52","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=1127"},"modified":"2014-10-30T13:20:36","modified_gmt":"2014-10-30T11:20:36","slug":"why-should-we-use-server-side-in-backbone-js","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/","title":{"rendered":"Why should we use server side in Backbone.js?"},"content":{"rendered":"<p>One of the challenges when building nontrivial Web applications is that JavaScript\u2019s non-directive nature can initially lead to a lack of structure in your code. JavaScript is often written as a free-hanging and unrelated blocks of code, and it doesn\u2019t take long before it becomes hard to make sense of the logic and organization of your own code. This becomes very much problematic when you are making a single page application(SPA). We can use server side scripting along with backbone.js to tackle this problem. Although this very approach creates problems of it\u2019s own.<\/p>\n<p>In this article we are going to discuss about applying server side scripting to the backbone.js and how to deal with the problems.<\/p>\n<p>Backbone.js is a Java script framework known as MV* framework. This framework has the Backbone.sync function to perform CRUD (Create, Read, Update, Delete) operations. In order for a model object to perform these operations, it should have a property named \u2018url\u2019. The \u2018sync\u2019 function receives 3 arguments: method, model and options. Model objects also have functions that call the \u2018sync\u2019 functions, these functions are: \u2018fetch\u2019, \u2018save\u2019 and \u2018destroy\u2019. The function Save does both Create and Update operation: If the property id Attribute is defined, and the id Attribute is set, \u2018save\u2019 sends an update request, otherwise it sends a \u2018create\u2019 request. The content type of the request is \u201dapplication\/json\u201d.<\/p>\n<h2>WHY SHOULD WE USE SERVER SIDE IN BACKBONE.JS?<\/h2>\n<p>Backbone.js is a lightweight framework that addresses this issue by adding structure to\u00a0JavaScript-heavy Web applications.<\/p>\n<p><strong>Self-contained building blocks<\/strong><\/p>\n<p>Backbone.js provides several classes (Model, Collection, View, Router) that you can extend to define the building blocks of your application. To build an app with Backbone.js, you first create the Models, Collections, and Views of your application. You then bring these components to life by defining a \u201cRouter\u201d that provides the entry points of your application through a set of URLs.<\/p>\n<p><strong>Data Binding<\/strong><\/p>\n<p>With Backbone.js, you bind Views to Models so that when a Model\u2019s data changes, all the Views bound to that Model automatically re-render. No more complex UI synchronization code.<\/p>\n<p><strong>Elegant REST Integration<\/strong><\/p>\n<p>Backbone.js also provides a natural \/ magical \/ elegant integration with RESTful services. If your back-end data is exposed through a pure RESTful API, retrieving (GET), creating (POST), updating (PUT), and deleting (DELETE) models is incredibly easy using the Backbone.js simple Model API.<\/p>\n<h2>DIFFERENCE BETWEEN CLIENT AND SERVER SIDE RNDERING:<\/h2>\n<p><strong>Client-side rendered apps<\/strong><\/p>\n<p>If you\u2019ve ever built a fully client-side rendered app, you are probably aware of its downfalls: slow loading\/render times, and no useful search engine indexing of your pages.<br \/>\nDespite the downfalls, these apps are pretty straightforward to build:<\/p>\n<p>The backend serves a super-lightweight html page: pretty much an empty \u2018body\u2019 tag with one or so \u2018div\u2019 elements that your JS app dynamically fills in. All of the data rendering happens via client-side templates that are attached as script tags to the html page.<br \/>\nThis is great in that your app can get delivered to any JS-capable device and more or less run the same way. Of course, download times of JS bundles, mobile browser fetch order, and the speed of JS processing for your app will vary.<\/p>\n<p><strong>Server-side Rendered Apps<\/strong><\/p>\n<p>Here\u2019s an overview of the necessary pieces for approaching a server-rendered app:<br \/>\nAs expected, the server actually returns a heavier page to the client. It will consist of html representations of data that would have normally been rendered on the client-side via script-tag templates. Search engine crawlers will actually see the content when they arrive! Instant SEO boosts and a guaranteed increase in organic traffic to your pages. The client won\u2019t have to download your entire JS app, parse and execute it, set up the router, instantiate the proper views and models, fetch the JSON data, and then finally render that data to see a piece of content. The content is all there when the client arrives \u2013 increasing the perceived speed of your page. The backend further utilizes the bootstrap able data that it has available to render more of the page.You now have more of a baseline guarantee as to when users will see your page\u2019s content.<\/p>\n<p>Although their are some downfalls to this technique also, as depending on how you distribute the responsibilities of your api and html rendering services, your backend has to think about both JSON and HTML-fragment caching. Along with fragment caching, you now have to apply the hard problem of cache invalidation to both your JSON and HTML at the cache. The server also can\u2019t understand the Underscore templates.To recover from this problem we can use node.js.<\/p>\n<p>Now we have understand a little bit of the upsides and downsides of client side and server side rendering. So, how do we figure out how are our requests will be handled by the server?<br \/>\nLet us look through it.<\/p>\n<h2>HOW DOES THE SERVER KNOW WHAT REQUEST TYPE IT RECEIVES?<\/h2>\n<p>The client-side developer specifies one \u2018url\u2019 only per model. The server-side program can determine the type by checking the value of $_SERVER[&#8216;REQUEST_MOTHED&#8217;]:<\/p>\n<ul>\n<li>\u2018GET\u2019 \u2013 a read (or fetch) request.<\/li>\n<li>\u2018POST\u2019 \u2013 a create(save a new model) request.<\/li>\n<li>\u2018PUT\u2019 \u2013 an update(save existing model\u2019s detail) request.<\/li>\n<li>\u2018DELETE\u2019 \u2013 a delete(destroy) request.<\/li>\n<\/ul>\n<h2>WHAT TO SEND AND HOW TO READ?<\/h2>\n<p>Backbone.sync uses AJAX to send requests to the server. What you have to pass is the method and model. You better not skip the 3rd arguments, options, which contains at least two member:<\/p>\n<ul>\n<li>\u2018success\u2019 \u2013 a function called when the server processes the request successfully.<\/li>\n<li>\u2018error\u2019 \u2013 a function called when the server fails to process the request.<\/li>\n<\/ul>\n<h2>READ REQUESTS:<\/h2>\n<p>If you send a \u2018fetch\u2019 request, specify \u2018data\u2019 in the \u2018options\u2019 argument, for example:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">myModel.fetch({\r\ndata: {\u2018attr1\u2032:\u2019value1\u2032, \u2018attr2\u2032:\u2019value2\u2032, \u2026 , \u2018attrN\u2019:\u201dvalueN\u2019},\r\n...<\/pre>\n<p><strong>IN THE SERVER SIDE:<\/strong><\/p>\n<p>The request attributes are taken from $_GET or $_REQUEST, as usual.<\/p>\n<h2>SAVE REQUESTS:<\/h2>\n<p>Send the attributes and the options.<br \/>\nFor example:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">myModel.save(myModel.attributes, {...<\/pre>\n<p><strong>IN THE SERVER SIDE:<\/strong><\/p>\n<p>The data should be read from the file \u201cphp:\/\/input\u201d, a filename used for reading data from the request body. The content is a string, and should be parsed, but since the incoming request data is JSON encoded, you should use the PHP method \u201cjson_decode\u201d.<br \/>\nFor example:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">$post_vars = json_decode(file_get_contents(\u2018php:\/\/input\u2019), true);<\/pre>\n<h2>DESTROY REQUESTS:<\/h2>\n<p>This time, set the \u2018data\u2019 member of the options argument to a JSON string. For example:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">Backbone.sync(\u2018delete\u2019, myModel,{\r\ndata: JSON.stringify(myModel), .... } );<\/pre>\n<p><strong>IN THE SERVER SIDE:<\/strong><\/p>\n<p>This will delete the saved data that we have in server previously. For example:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">$post_vars = json_decode(file_get_contents(\u2018php:\/\/input\u2019), true);<\/pre>\n<h2>SENDING A RESPONSE TO THE CLIENT:<\/h2>\n<p>The response is everything the server side application prints to the standard output. You should print your response data encoded into JSON, as follows:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">echo json_encode(responsedata);<\/pre>\n<h2>READING A RESPONSE:<\/h2>\n<p>The response returned from the server is the first argument passed to the \u2018success\u2019 callback function. It is not a model object, and you should get values from there using the method \u2018get(attr-name\u2019 or the member \u2018attributes\u2019.<br \/>\nFor example:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">{success: function(msg){\r\nswitch (msg.get(\u2018status\u2019)){  ...<\/pre>\n<p>Although in the above we have discussed many pros and cons for using server side scripting and how to use them. There are many other ways to use it to tap in the maximum potential of using server side scripting.<\/p>\n<p>Some related articles :<\/p>\n<ul>\n<li><a title=\"Introduction to Backbone.js\" href=\"http:\/\/www.phloxblog.in\/introduction-backbone-js\/#.U6xOqXWSzHx\" target=\"_blank\">Introduction to Backbone.js<\/a><\/li>\n<li><a title=\"Models in Backbone.js\" href=\"http:\/\/www.phloxblog.in\/models-backbone-js\/#.U6xM23WSzHw\" target=\"_blank\">Models in Backbone.js<\/a><\/li>\n<li><a title=\"Underscore Methods in Backbone.js\" href=\"http:\/\/www.phloxblog.in\/underscore-methods-backbone-js\/#.U3w4CNKSxFA\" target=\"_blank\">Underscore Methods in Backbone.js<\/a><\/li>\n<li><a title=\"Backbone Routes and History\" href=\"http:\/\/www.phloxblog.in\/backbone-routes-history\/\" target=\"_blank\">Backbone Routes and History<\/a><\/li>\n<li><a title=\"Collections in Backbone.js\" href=\"http:\/\/www.phloxblog.in\/collections-backbone-js\/#.U3w_FdKSxFA\" target=\"_blank\">Collections in Backbone.js<\/a><\/li>\n<li><a title=\"Understanding view in Backbone.js\" href=\"http:\/\/www.phloxblog.in\/understanding-view-backbonejs\/#.U6xM3nWSzHw\" target=\"_blank\">Understanding view in Backbone.js<\/a><\/li>\n<li><a title=\"Templates In Backbone.js\" href=\"http:\/\/www.phloxblog.in\/templates-backbone-js\/#.U6xNTXWSzHx\" target=\"_blank\">Templates In Backbone.js<\/a><\/li>\n<li><a title=\"Backbone.js at a glance\" href=\"http:\/\/www.phloxblog.in\/backbone-js-glance\/#.U6xMzHWSzHw\" target=\"_blank\">Backbone.js at a glance<\/a><\/li>\n<\/ul>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/www.phloxblog.in\/use-server-side-backbone-js\/\">Why should we use server side in Backbone.js?<\/a> from our <a href=\"http:\/\/www.webcodegeeks.com\/wcg\/\">WCG partner<\/a> Piyas De at the <a href=\"http:\/\/www.phloxblog.in\/\">Phlox Blog<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>One of the challenges when building nontrivial Web applications is that JavaScript\u2019s non-directive nature can initially lead to a lack of structure in your code. JavaScript is often written as a free-hanging and unrelated blocks of code, and it doesn\u2019t take long before it becomes hard to make sense of the logic and organization of &hellip;<\/p>\n","protected":false},"author":18,"featured_media":915,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-1127","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-backbone-js"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Why should we use server side in Backbone.js? - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"One of the challenges when building nontrivial Web applications is that JavaScript\u2019s non-directive nature can initially lead to a lack of structure in\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Why should we use server side in Backbone.js? - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"One of the challenges when building nontrivial Web applications is that JavaScript\u2019s non-directive nature can initially lead to a lack of structure in\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:author\" content=\"http:\/\/www.facebook.com\/phlocblogger\" \/>\n<meta property=\"article:published_time\" content=\"2014-10-30T11:25:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/backbonejs-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Piyas De\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/phloxblog\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Piyas De\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/\"},\"author\":{\"name\":\"Piyas De\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/7aab6e040a06f0dfe0d60c27768aa424\"},\"headline\":\"Why should we use server side in Backbone.js?\",\"datePublished\":\"2014-10-30T11:25:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/\"},\"wordCount\":1328,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/backbonejs-logo.jpg\",\"articleSection\":[\"Backbone.js\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/\",\"name\":\"Why should we use server side in Backbone.js? - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/backbonejs-logo.jpg\",\"datePublished\":\"2014-10-30T11:25:52+00:00\",\"description\":\"One of the challenges when building nontrivial Web applications is that JavaScript\u2019s non-directive nature can initially lead to a lack of structure in\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/backbonejs-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/backbonejs-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Backbone.js\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/backbone-js\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Why should we use server side in Backbone.js?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/7aab6e040a06f0dfe0d60c27768aa424\",\"name\":\"Piyas De\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/eadd6728b7b5be23f0d6585da1a953926e49c6f2369703d6cb4f1147d4dd2203?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/eadd6728b7b5be23f0d6585da1a953926e49c6f2369703d6cb4f1147d4dd2203?s=96&d=mm&r=g\",\"caption\":\"Piyas De\"},\"description\":\"Piyas is Sun Microsystems certified Enterprise Architect with 10+ years of professional IT experience in various areas such as Architecture Definition, Define Enterprise Application, Client-server\/e-business solutions.Currently he is engaged in providing solutions for digital asset management in media companies.He is also founder and main author of \\\"Technical Blogs (Blog about small technical Know hows)\\\"\",\"sameAs\":[\"http:\/\/www.phloxblog.in\",\"http:\/\/www.facebook.com\/phlocblogger\",\"http:\/\/in.linkedin.com\/in\/piyasde\",\"https:\/\/x.com\/https:\/\/twitter.com\/phloxblog\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/piyas-de\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Why should we use server side in Backbone.js? - Web Code Geeks - 2026","description":"One of the challenges when building nontrivial Web applications is that JavaScript\u2019s non-directive nature can initially lead to a lack of structure in","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/","og_locale":"en_US","og_type":"article","og_title":"Why should we use server side in Backbone.js? - Web Code Geeks - 2026","og_description":"One of the challenges when building nontrivial Web applications is that JavaScript\u2019s non-directive nature can initially lead to a lack of structure in","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_author":"http:\/\/www.facebook.com\/phlocblogger","article_published_time":"2014-10-30T11:25:52+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/backbonejs-logo.jpg","type":"image\/jpeg"}],"author":"Piyas De","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/phloxblog","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Piyas De","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/"},"author":{"name":"Piyas De","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/7aab6e040a06f0dfe0d60c27768aa424"},"headline":"Why should we use server side in Backbone.js?","datePublished":"2014-10-30T11:25:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/"},"wordCount":1328,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/backbonejs-logo.jpg","articleSection":["Backbone.js"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/","name":"Why should we use server side in Backbone.js? - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/backbonejs-logo.jpg","datePublished":"2014-10-30T11:25:52+00:00","description":"One of the challenges when building nontrivial Web applications is that JavaScript\u2019s non-directive nature can initially lead to a lack of structure in","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/backbonejs-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/backbonejs-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/javascript\/backbone-js\/why-should-we-use-server-side-in-backbone-js\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/"},{"@type":"ListItem","position":3,"name":"Backbone.js","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/backbone-js\/"},{"@type":"ListItem","position":4,"name":"Why should we use server side in Backbone.js?"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/7aab6e040a06f0dfe0d60c27768aa424","name":"Piyas De","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/eadd6728b7b5be23f0d6585da1a953926e49c6f2369703d6cb4f1147d4dd2203?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/eadd6728b7b5be23f0d6585da1a953926e49c6f2369703d6cb4f1147d4dd2203?s=96&d=mm&r=g","caption":"Piyas De"},"description":"Piyas is Sun Microsystems certified Enterprise Architect with 10+ years of professional IT experience in various areas such as Architecture Definition, Define Enterprise Application, Client-server\/e-business solutions.Currently he is engaged in providing solutions for digital asset management in media companies.He is also founder and main author of \"Technical Blogs (Blog about small technical Know hows)\"","sameAs":["http:\/\/www.phloxblog.in","http:\/\/www.facebook.com\/phlocblogger","http:\/\/in.linkedin.com\/in\/piyasde","https:\/\/x.com\/https:\/\/twitter.com\/phloxblog"],"url":"https:\/\/www.webcodegeeks.com\/author\/piyas-de\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/1127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=1127"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/1127\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/915"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=1127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=1127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=1127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}