EmberJS architecture overview - model-view-controller

I'm looking for an explanatory video / writeup that would present the different components / patterns of an EmberJS application. I'm familiar with a couple of MVC architectures however this design pattern is very flexible. For example different frameworks seem to understand controllers differently. There also seem to be things that are specific to Ember such as a router and routes.
These slides http://www.lukemelia.com/devblog/archives/2012/08/23/architecting-ember-js-apps/ seem to be more or less what I want. Unfortunately, I was unable to find a working video to go together with them.
The materials posted on EmberJS site seem to follow a tutorial format. This is not at all what I want. Instead of learning how to build things instantly, I want to understand the general architecture first so that I know what kind of code should go where.

I gave an "Introduction to Ember.js" talk somewhat more recently that might be more helpful: http://www.lukemelia.com/blog/archives/2013/03/29/introduction-to-ember-js/ The page has embeds for slides as well as video.
I heartily endorse your approach to learning Ember, too. Understanding how responsibilities are divided in Ember and how those layers relate is a big part of creating elegant, maintainable apps.

The tag wiki lists some great video resources at the bottom.
You might send Luke a message to see if he has a copy of that presentation, he's still very active in the community.
https://stackoverflow.com/tags/ember.js/info

Related

Joomla versus CodeIgniter/YII

A partner has a website that needs to be rebuild from scratch as it simply can't cope with the large number of visitors (currently build using SilverStripe). The site should be able to deal with 5 million or more members using 20+ languages.
We were considering using CodeIgniter or YII because from research both appear to be excellent performers. However several people advised that we should consider the latest version of Joomla for this. For small websites we are happy to use Joomla but for a heavy load website our feeling says that we have to stay away from that. We are however not able to find any comparison between both from a performance point of view but we do require good arguments why Joomla would or would not at all be a good candidate for this. One comparison can be found here: http://vschart.com/compare/yii/vs/joomla/vs/codeigniter however this doens't tell me what to expect when the number of visitors is really high.
Can some advise how Joomla compares to CodeIngitor or YII considering that the site will receive a very high number of vistors and will use a 20+ languages (for silverstripe we build a translator module as the build in CMS was not usefull when using so many translators).
When you're dealing with a site of that scale, it's probably best not to shift to Joomla. Joomla can handle a fair bit, but I'd suggest that it would be far easier to have a Joomla site that large when the site has been adapting as the traffic increases.
Part of what makes your question hard to answer is that we don't know much about what your current site does.
Is it mainly a CMS? If so, Drupal may be a decent fit for you.
Is it a custom web application? It sounds like it could be, based on the number of translations you're handling.
Is it somewhere in-between? This could also be what you're dealing with.
If you're looking at either of the bottom two options, yes, shifting away from SilverStripe (but not to Joomla) sounds like it might be a good thing.
Given the volume of traffic you're dealing with, it sounds like you probably already have a revenue stream and a development team. In that case, it might be worth having a few of your developers play with CodeIgniter and Yii and see what they think.
I wrote up a detailed answer to a question about what type of framework to choose a while ago, which you can look over here:
https://stackoverflow.com/questions/10095906/yii-or-zend-or-other-frameworks-under-the-following-requirements/10115678#10115678
I'm a Yii fan, having checked out a bunch of other frameworks. Regardless of which framework you use, I'd like to offer one piece of advice that I've found key on all projects I've worked on.
You want to work with objects, not data arrays
The reason for the above is that your models (and the objects they produce) can end up having your business logic built into them. Doing this makes life far, far easier in the long run. A great book on the subject, aimed at manager's and quite high-level (there is no code, although there might be a few lines of psuedo-code), is Object Technology: A Manager's Guide. I'd highly recommend it.
Framework thoughts
CakePHP
I started dabbling with CakePHP until I found out it didn't hand back objects (just arrays), at which point I ran screaming.
CodeIgniter
Looking at what CodeIgniter has for database model support, I think you would quickly hit its limitations with a site of your size, so would recommend against it. And having EllisLabs deciding to leave CodeIgniter behind (see their website for more details) is not a good sign. The signs say stay away.
Of the PHP frameworks out there, these are the ones I hear the most things about:
Symfony 2
Yii (disclosure: I work with this one daily)
Laravel
Symfony
From what I can see of it, has been a huge stimulus to the PHP community and many best practices have come out of that community. Unit testing, Composer, pushes for PSR-1/2, the ideal of modularity of code (some of their core code is ending up in Drupal 8) are all great things that have spurred the PHP community into writing code that's better than spaghetti code. With that said, it feels kind of heavy and enterprise-y and looked to have a pretty heavy learning curve.
Yii
When I was looking for a framework, I had a lot of legacy code that needed migration. Yii's way of handling things, although opinionated at times, has done a lot for me as far as exposing me to good practices that are used heavily on the web. Highly recommended as well.
Laravel
When I was looking for a framework (2+ years ago), Laravel didn't exist. It's apparently quite slick and cutting edge (haven't looked at it yet, I've been busy landing new work regularly in the Yii world), but I am interested in dabbling with it. That said, here's a thoughtful article about Laravel and couple of considerations that I've wondered about.
The main developer, Taylor Ortwell, seemed to be a dominant force. That's a great thing while he's making money doing this and enjoying it. Not sure what would happen to the framework if he decided to do something else.
The speed of development on the framework is an awesome thing and means that all sorts of creative juices are flowing. It's a great place to go look at cool new things. That said, you're going to want your developers to be able to easily find information about the framework they're working with, which in 3-6 months may be severely out of date in the Laravel community. The Ruby on Rails community has the same type of good/bad problem when I've looked around over there; there is so much information about the new stuff that sometimes it's hard to find information about the version of the framework you're dealing with.
That said, there are lots of cool choices out there :-) I should probably wrap up, as this has gone on far longer than I'd intended. Let us know what you end up deciding and how it ends up going.
How big is the site really? Bigger than joomla.org?
Are you talking about big in terms of the amount of content in the database or in terms of the number of visitors.
Joomla really does not have problems with scale unless you are on an older version of MySQL in which case it slows down.
It depends on what kind of application you want.
If you want a CMS, Joomla is the way to go. Because this is what it was build for.
If you are about to create a real "custom" application Yii/Codeigniter is the way to go. (This is what yii was build for)
Regarding performance, from my expericnece Yii is a lot faster, because it comes with way less overhead. You can build the application just as you need it.
Well it's like compare green and salty. Really joomla is CMS, and Yii and CI are frameworks. If you considering make highload on joomla - it's not your job.
If you have high frontend load - maybe watch on js frameworks? Yii+backbone.js or ext.js for frontend is awesome, since you'll move alot to clientside.
CI is dead. I honestly like it, but its dead already. No extensions, no namespaces in future, nothing.
I can say + of Yii:
*faster then CI;
*have great documentation and wiki articles;
*have great and active community and developers;
What else i can add? Active record is good for small databases, but not usable for highloads. Also as i said on yii you can easily make js framework+yii composition. Yii have good caching system. Long time support of stable versions.
I personally manage highload now, but its more backend/api/database. 150+ thousands database records daily, 300+ thousands requests to api, 50 milions records data table. It works like a clock for more then 2 months already.
Choose what you like, or write on native php if its really big system - best choice from practice.
Joomla is an award-winning content management system (CMS), which
enables you to build Web sites and powerful online applications. Many
aspects, including its ease-of-use and extensibility, have made Joomla
the most popular Web site software available. Best of all, Joomla is
an open source solution that is freely available to everyone.
CodeIgniter is an Application Development Framework - a toolkit - for
people who build web sites using PHP. Its goal is to enable you to
develop projects much faster than you could if you were writing code
from scratch, by providing a rich set of libraries for commonly needed
tasks, as well as a simple interface and logical structure to access
these libraries. CodeIgniter lets you creatively focus on your project
by minimizing the amount of code needed for a given task.
Yii is a free, open-source Web application development framework
written in PHP5 that promotes clean, DRY design and encourages rapid
development. It works to streamline your application development and
helps to ensure an extremely efficient, extensible, and maintainable
end product.
Joomla can't compare with CodeIgniter / Yii. But, If you need any CMS for your project, you can use Joomla (or maybe Wordpress). If you want to create any web application, then you need to decide for any PHP Framework. I use CodeIgniter for years, and I like it. They have a huge community, and the best user guide. Yii also has a great community and a lot of features. So, you can decide depending on you demand.

What JavaScript Frameworks and Libraries are best suited to cross-platform MMO game development?

I've played a great many MMORTS games such as Evony, Dragons of Atlantis and Kingdoms of Camelot. They all have some great features and a great many not so great problems. Simply for my own interest I wanted to try my hand at writing something similar. I don't intend to even try to compete with the big boys but I wanted to write it in a professional and scalable manner as if it was intended for eventual commercial release.
So that's the background that leads into the question. I have been looking at various frameworks and libraries that would be suited to this style of game. However there is such a plethora of options that my head is now spinning. I would like to get some input as to what other people think are the best options. I want to try and write this as a cross-platform / cross-browser webapp that can later be converted to a "Native" app using something like MoSync. I want to stick with HTML5, CSS3 and JavaScript technology.
Some of the things I am sure I want are:
It must be scalable (ie able to handle a significant number of simultaneous users)
I prefer to work with some sort of MVC framework (I am used to working with Joomla MVC and have been considering backbone.js for this aspect)
I am no JavaScript guru but will most likely want to work with jQuery (mostly in relation to client side views)
I like templates but am completely lost which template system to go with (ie mustache, handlebars, dust etc). I think my choice in this area will ultimately come down to which framework I end up with.
Chat is an important aspect of MMORTS games and I am thinking of using Node.JS and Socket.io (or NowJS) for this.
I have also been looking at Redis for key-value store.
At this stage I have abandoned the idea of using jQuery Mobile as initial tests have caused more headaches than they have solved.
So my front runners are Node.JS for server side JavaScript (possibly with NowJS to implement chat), Redis for key-value store, backbone.js for the MVC framework, mustache (or maybe LinkedIns fork of dust) for templating and Jquery of course.
I would greatly appreciate any input to help me make my final decision on what frameworks and libraries to use.
This is not a framework, but you may find Mozilla's Browser Quest implementation interesting. The whole thing is open source and they use HTML5 Canvas and Node.js (socket.io is a big player here) and it is entirely cross-platform
I'm working with a team on exactly this. Our research and experience suggests that a Node.js backend is definitely a good idea. What to use with Node.js? We've come up with two good possibilities:
Use websockets for communication and a front-end engine like Phaser for your rendering.
Use Isogenic Game Engine for everything.
(http://html5gameengine.com/ may help you to compare the feature-sets of the top HTML5 game engines including the ones I've just mentioned.)

Designing a GUI framework

I need to create a custom GUI framework for a project. I actually created a very primitive GUI framework which has buttons, images, text etc. But it is pretty simple and I don't have any prior knowledge of designing a GUI framework. The project we are working on got a little serious and I need to do a better job. So, what books or any kind of documentation can you recommend for me?
Note: I want to create the framework probably in an object-oriented way and I will probably use C# but the documentation does not need to be in C#.
Ok, I'm far from an expert but I'll try to write some useful stuff. I don't know much about your experience, so sorry if it seems silly.
I have been working with several GUI frameworks in the past, in various languages (wxpython, gtk+, swing, . . .).
Never as an expert, but here is what I can say :
Keep it simple. If you want to design from scratch, I guess there is no need for crazy complex stuff. Try to keep it as straightforward as possible by reducing the number of inputs and options in your elements.
b. A major common point of all the successful frameworks I know is the abstraction. Each single element can be easily handled, but it still has the power of all its parents.
This allows your objects to be really versatile while simple.
Read lots of other frameworks documentation. I like spending time reading the doc of GUI framework because it helps you understand the abstraction levels. I find the pygtk doc easy to read.
Use other frameworks. Most frameworks do things more or less in the same way. This is especially true for GUI frameworks. Frame containing layouts; menubars and statusbars; I bet 95% of the concepts you want to use can be found in the other frameworks.
In this way, the best way to know how to develop it is to know what you need and how to do it.
Whenever I work on a GUI, I start reading the corresponding series of articles here .
The writer does a great job explaining everything in a simple way, so that you can get along fast with the concepts.
Keep it open. Something I see more and more often is the use of high level syntax for describing GUIS. GTk for example can take XML files in input and create a whole interface out of it. I find it very nice for abstraction, and reuse. And I also greatly reduce the amount of code needed.
I couldn't really find books on the precise subject you want. I think you already searched on the web also.
I hope those small ideas will help you.

PHP Frameworks: Help Me Understand Common Statements

I've been reading up on several PHP frameworks, and reduced my candidates to CodeIgniter and Symfony (I know there are many more). Strongly leaning towards CodeIgniter, but have not 100% decided quite yet.
I'm not looking for a general "CodeIgniter vs Symfony" discussion.
One thing keeps coming up in comparisons: people say Symfony is for "advanced" coders and "bigger" sites; CodeIgniter is for "beginner" coders and "smaller" sites. But I have yet to see any technical proof of this. Everything I'm seeing about CodeIgniter feels right.
Can anyone explain structurally and technically where people are basing these statements on?
I want to understand all I can. Once I make a decision, I want to focus my attention on one framework.
Thanks,
Matthew
The biggest technical difference between CodeIgniter and Symfony (ver 1 and 2) is that Symfony is much easier to extend. This is especially true with Symfony2; you can replace entire parts of the framework as you see fit with custom code, or code from other libraries. You can even take any number of core components from Symfony2, and build your own framework on top of it. But, it's important to note that because Symfony is so 'advanced', it has a higher learning curve.
Here's how I see it: CodeIgniter is great when you have a small(ish) project that falls in the category of problems CodeIgniter is meant to solve. But when you want to do something your way, not CodeIgniter's way, you're going to have to fight the framework, which is never fun.
On the other hand if you're working on a Symfony2 project and want to do something your way, you can. It won't necessarily be quick, but it is possible. To me, that's the most important thing - you need to be able to make the framework do what you want it to do.
If you have time, read through the Symfony docs and cookbook - they should give you an idea of what Symfony is capable of and how to customize and extend it.
Everything I'm seeing about CodeIgniter feels right.
Then go with CodeIgniter. The most important thing is that you're comfortable with the framework/toolset. If you complete a project and find that it's lacking in features, you can always check out other frameworks.
I would recommend starting without a framework. If you have been programming awhile and are comfortable with concepts like MVC and why you might implement your code in this pattern, then frameworks start to make more sense.
Frameworks are good for larger projects where there are many programmers and you need a consistent method of building application layers, like MVC. The framework will likely provide some mechanism for object management and a consistent way for you to build application events (controller) and to separate the view logic from the model logic.
My PHP apps have been smaller, so I have not used any frameworks. When I used to code in Coldfusion, on larger apps, I used MachII, Model-glue, Fusebox and ColdBox. Each was good at something, each promoted consistency, but each had a lot of overhead and often times felt like it was in the way. I saw some developers get stuck because of the framework.
I did not start using any CF frameworks until I had build smaller apps without one.
If you like CodeIgniter better, for whatever your reasons, go with it.
CodeIgniter, because of the gentle learning curve and the great documentation. Give other frameworks a go if you ever feel you outgrow CI, which you may never do.

Learning Cappuccino

What is the best source to learn Cappuccino? I do "traditional" web development, but i'm very interested in this new framework. Please note that I have no knowledge of Objective-C.
As mentioned above, the website is a good place, but there are also some other good resources:
http://cappuccinocasts.com/ (screencasts)
http://www.nice-panorama.com/Programmation/cappuccino/
http://www.littletreesoftware.com/blog/
http://theocacao.com/document.page/593
There are a few others too, and many of them are linked to from the site.
I wrote a real life cappuccino tutorial based on an actual customer project: http://www.springenwerk.com/2009/09/real-life-cappuccino-tutorial-part-1.html
On the tutorials is says:
A great introduction to Objective-J. Familiarity with JavaScript is recommended, prior knowledge of Objective-C not required.
http://cappuccino.org/learn/tutorials/
It seems the website is a good place to learn. Interesting framework.
You also have http://www.cappuccino-project.org/learn/
It is our new work-in-progress website. Not complete at all, it still has some very basic tutorials to help you starting coding with Cappuccino
I recently took up learning cappuccino. I found the Cappuccino Casts and the tutorials on cappuccino.org, however, like you, I come from a web development background - not cocoa / desktop apps.
Following some online tutorials was good to a degree, but I felt I lacked fundamental knowledge about the Objective-C and Cocoa and Cappuccino is modelled so closely to it. I bough a copy of Aaron Hillegass' book called "Cocoa(R) Programming for Mac(R) OS X" here: http://www.amazon.com/Cocoa-Programming-Mac-OS-3rd/dp/0321503619/ref=pd_sim_b_3 which I felt really helped with my base understand of application development rather than traditional web development.
I would definitely recommend giving it a read, I worked my way through it in a few days and thought it gave enough knowledge to understand what all the Cappuccino stuf was about.
I recently found that when I install Cappuccino from source, there is a fairly significant amount of code to learn from hidden away in <install-dir>/Cappucino/Tests/Manual
There is a wealth of code there that isn't advertised anywhere but is certainly good enough to learn from. Just drop the Frameworks next to the index.html file in each test folder and open up and learn!

Resources