I'm using Ext-JS 4 on client-side and for my server-side I'm using CakePHP. They are communicating with JSON.
I saw that Sencha Team created Ext.direct for communicating with server side (PHP, Ruby, .NET ect.).
So, can you tell me advantages and disadvantages of using Ext.direct over PHP framework like CakePHP or Zend?
As usual, it brings you more organized and structurized code by giving an additional abstraction layer with no or very little performance loss. Use it over your framework. Or do not use. It's up to you.
Ext.Direct is a protocol, not an server-implementation! Ext.Direct has a lot of advantages over standard RESTful or "normal" js requests, because it specifically is written for Sencha Touch and ExtJS and so all models and proxies are already correctly configured and ready to go.
If you are using CakePHP there is a framework called Bancha which implements Ext.Direct into CakePHP. It also handles all the marshalling and data transformations to save you a ton of time.
Related
Both angular and laravel are great frameworks meant for slightly different purposes. Since they achieve to do similar things like -
They both focus on an MVC-inspired application structure, and each of them support a different directory structure by default
They both offer templating engines of their own, with conflicting syntax (which can be changed of course)
They both offer DOM iterators ( php foreach vs ng-repeat )
And many more similar conflicts
Since they are so similar in philosophy, isn't it redundant (and even conflicting sometimes) to develop a web app which uses both these frameworks?
Since each of them are so powerful in themselves, would it be a good idea to mix both? How common is the combined use of these in real world websites?
Am I better off using angular with basic PHP instead, if say, I was developing a medium scale web service (5000+ users)
What are some of the other backend+frontend framework combinations which are symbiotic and most frequently used?
Yes they can do similar things, but they don't have to.
Of course it doesn't make much sense to use the same feature of both of the frameworks. Meaning if you choose to use AngularJS for templating you don't need Laravel's views. But that's nothing you should worry about. If you don't use it, you don't use it. The fact that you don't use the entire functionality of a framework shouldn't have any bad impact on your application.
But note: Be consistent
Don't render one view with Laravel and use AngularJS for the other.
Recommendation
I personally have made good experiences with Laravel as a RESTful API and AngularJS taking care of the rest. So AngularJS is doing all the frontend stuff and communicates with Laravel only via JSON.
I am replicating an existing application in Silverstripe (PHP framework). The application has a lot of jQuery already and while its organised well at the moment it could get out of control as I grow it past its current point.
Having spent most of my development experience in PHP/MySQL, I have little experience in js front-end frameworks and would not likely use a framework to manage data manipulation with the server from the get go. Really I'm just looking for a suitable solution to organise and manage the js in the short term and something I can eventually evolve (with more experience under my belt) to a point I can manage all frontend logic with.
Is backbone the way to go? Any other advice?
I've been using SilverStripe framework with EmberJS and EmberData with great success. Ember connects to SilverStripe with a RESTful API module
But you can very well use any JS framework and mkae your own SS controller of find other SS modules to help http://addons.silverstripe.org/
I'm working on a project that uses Node.js as server and the client is a webapp developed using Ext JS 4.2.
The communication protocol relies on the Socket.io library.
I was trying to integrate the socket.io communication in my webapp in a way that is as much as possible polished and compliant to the Ext JS 4's MVC.
The first idea I had was to have a class that was looking like THIS that basically has all the socket.io callbacks which will get the needed Ext JS elements and set the received data to them.
However i saw that ExtJS 4 introduces the concept of Proxy and Stores and I was thinking if what I need can be achieved using these functionalities (I'm a beginner with extjs 4).
Long story made short: What's in your opinion the best practice to handle this scenario? Also: even if it's possible to achieve what I need with proxies/stores, will it be easier and at the same time a good pratice using them in this case or the callbacks way is fine enough?
Any other solution is welcomed.
I am starting a large scale EXT JS application and wanted to know if anyone knows of any helpful resources. Everything i've seen up to this point has been a single page application. I would like to use MVC for the front end. Thanks for your help!
#Sra's comment is the most appropriate response here.
Regarding 'single page applications' then can certainly be used for larger scale projects, but careful management of code and the DOM is needed.
I think you might need to provide a bit more information about how you're planning to do things and what you're worried about.
Ext offers a client side MVC implementation but this does tend to centre around the single page application model. What this means is that you write your models, views and controllers and let your app decide which to render.
The app is responsible for creating and disposing of client side controller and view instances, and the models really just exist to validate data and provide a sensible mechanism for sending / retrieving data from the server side.
If you're wanting to use a typical server side MVC implementation e.g. ASP.NET MVC, then it should be noted that unless the app is massive, you'll probably just end up with a single .NET 'view', this view will contain your entire ExtJS app.
You 'can' if you want, create a series of mini apps via Ext and render those in several server side views, but you will end up with a lot of duplicated (or shared) code which may well be a pain to manage.
So to sum up, yes, you can use Ext for larger applications, yes you can use MVC (both client and server side) and finally yes, your front end will likely form a single page application.
Just to add a bit to the #dougajmcdonald's excellent answer: there are improvements to MVC architecture and dependency handling coming up in Ext JS 4.2, that are specifically aimed at folks with big apps on their hands. It will be a lot easier to share code between related applications, which would also make writing multi-page apps easier as well.
EXTjs is not supposed to be coded in single page. EXTjs 4 supports MVC architecture.
http://docs.sencha.com/ext-js/4-1/#!/guide/application_architecture
please sencha command also. it helps you to create a backbone of MVC application
http://docs.sencha.com/ext-js/4-1/#!/guide/command
Background:
I have basically no experience in Silverlight, i was asked to start reading up on the tech and provide some insight for client which may want to rebuild the UI of their .Net Desktop application in silverlight. So my experience is what i have been able to google (which surprisingly is not easy) and the few tutorials i have done.
I am aware Silverlight could use ASMX Web Service , WCF Services or REST to do communications with the server.
Question:
Are there any other official or non-official mothods of communication anyone knows of?
Thank you in advance,
David
Start here:
http://msdn.microsoft.com/en-us/library/dd470099(VS.95).aspx
http://videos.visitmix.com/MIX08/T13
http://videos.visitmix.com/MIX09/T42F
I am somewhat biased having worked on the technology :), but I would urge you to consider WCF.
This method gives you great usability: It literally takes a few minutes to "Add New... Silverlight-enabled WCF Service" to your project and have everything up-and-running. In Silverlight 3, this uses a very performant binary XML protocol under the covers, which can be easily switched to regular text XML for debuging with just a 2-line config change. And it integrates nicely with most authentication models that you would want (see the security section in the doc link above).
Of course, you can roll-your-own communication using HttpWebRequest, WebClient, or even sockets. Using WebClient is probably best if you want to go with REST on the server. Keep in mind that some things that are normally possible in REST (such as using PUT and DELETE HTTP verbs) are not possible in browser plugins such as Flash and Silverlight due to browser restrictions.
Finally, there's .NET RIA Services. It's a bit too heavy-weight for some scenarios and doesn't have some of the WCF features (like binary and duplex), but it's more than just a way to communicate with the server: It gives you a whole perscriptive framework for building SL apps with server-side data, and gives you a lot of nice features like validation, paging, etc. for free.