Development on Va...
Follow
Find tag "API"
9.1K views | +3 today
Development on Various Platforms
Your new post is loading...
Your new post is loading...
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

JavaScript API Design Principles

JavaScript API Design Principles | Development on Various Platforms | Scoop.it
Ariya Hidayat discusses principles for designing JavaScript APIs by observing the interactions between modules, particularly the influence of an interface on the code patterns.

Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Easy API Scaffolding with Simple-API and Node.js

Easy API Scaffolding with Simple-API and Node.js | Development on Various Platforms | Scoop.it

API’s are often a pain to build. There’s all kinds of moving pieces: routing, data parsing, serialization, database interactions, etc. For years I’ve struggled with writing web API’s in Node.js – there’s just so much complexity required in an API boilerplate. That’s why I wrote Simple API. Simple API is an incredibly easy to use module for writing web-based APIs in Node.js

I often hear people say that they’ve written a library that makes something “simple”, but in reality they’ve just made it a different kind of complex. In this article, I hope to prove that’s not the case with Simple API. This tutorial is going to teach you to write an API for a ToDo list, where the entire project is less than 300 lines of code. That’s the entire project – the API related files are less than 200 lines of code.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Modern Web Application Layered High Level Architecture with SPA, MVC, Web API, EF, Kendo UI, OData

Modern Web Application Layered High Level Architecture with SPA, MVC, Web API, EF, Kendo UI, OData | Development on Various Platforms | Scoop.it

It’s probably important you have at least a high level picture what an SPA architecture looks like now that there is quite a bit more design work involved on the client side especially with more and more implementations are around SPA and patterns like MVVM; so hence this post. Obviously there is no such thing as one size fits all especially when it comes to architecture, so feel free to omit or add to the architecture based on your specific needs.

 

Client Layer (HTML5 Browser)
Model View ViewModel (MVVM) is a design pattern which helps developers separate the Model (the data) from the View (the UI). The View-Model part of MVVM is responsible for exposing the data objects from the Model in such a way that those objects are easily consumed in the View. Kendo MVVM is an implementation of the MVVM pattern which seamlessly integrates with the rest of the Kendo framework (widgets and DataSource).

 

Web Layer (Server)
Almost the entire ASP.NET MVC Web Layer can leverage the DI & IoC Pattern, you can read up on what the benefits are and how to do this download both a sample MVC app that uses MEF or Unity 3 from one of my previous post.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Designing APIs for Asynchrony

Designing APIs for Asynchrony | Development on Various Platforms | Scoop.it

Personally, I don’t actually care all that much about the whole promises/callbacks/coroutines/generators debate. It’s provably trivial to turn any callback-taking API into a promise-returning API or generator-yielding API or vice-versa.

I’m of the opinion that breaking functionality into small enough chunks that your boilerplate doesn’t matter is much more important than which boilerplate you decide tastes the yummiest. In JavaScript, we have first-class language support for passing functions around, so I tend to use callbacks, simply because it requires no extra “stuff”.

What’s important to me is that an API be useful, performant, and easy to reason about. When I’m writing JavaScript, I care a lot about how V8 is going to optimize it, and so try to choose patterns that it can optimize nicely. As of today, generators just aren’t first-class enough, and Promises require an extra abstraction. That may change someday, but these principles probably will not.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from Symfony2 Framework php
Scoop.it!

Create RESTful API for Symfony2 with Apigility | Enrico Zimuel

Create RESTful API for Symfony2 with Apigility | Enrico Zimuel | Development on Various Platforms | Scoop.it
Enrico Zimuel, software developer since 1996. Open source contributor, author of books and articles about web programming and applied cryptography, international speaker.

Via Arno_Raulet
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Using Express.js for APIs

Using Express.js for APIs | Development on Various Platforms | Scoop.it

A few tips and libraries for creating and documenting RESTful APIs with Express.js.

These days I spend more time using Express for APIs that send nothing but JSON. In this post I’ll cover a few libraries and reminders to help keep your code organized and your API friendly for developers.

I’m assuming an API backed by MongoDB, and that we’re using Mongoose. Covering the basics of Mongoose is beyond the scope of this article, but I want to highlight a few lesser-known bits.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Making Cross-Domain Requests with CORS

HTTP requests from Javascript are traditionally bound by the Same Origin Policy, which means that your ajax requests must have the same domain and port. The common ways to get around this are JSON-P, Proxying and message passing via <iframe>s. These all have their quirks, but the thing they generally have in common is legacy browser support.

CORS stands for Cross-Origin Resource Sharing. It is a more robust way of making cross-domain requests supported by all but the lowest grade browsers (IE6 and IE7).


Via Jan Hesse
more...
No comment yet.