How do you implement MVC in actionscript 3.0? Do you build your own classic (based on GoF book) simple architecture or use some of modern frameworks? I learn on "classic solution" and couldn't understand is it better to use some mvc framework? Which one is good for this purpose?
I use my own setup that implements MVC practices/architecture, but is not a framework. In my mind, MVC is a way of organizing the code (and functionality). Available MVC frameworks features to simplify and automate interaction.
For many of my projects, the added functionality of an MVC framework is not needed and just ends up imposing some restrictions. If these features are important or you're working with a team, the mvc framework has many benefits. But for personal projects, I find the simplicity of my own setup does the job.
There are several AS3 MVC implementations, the most popular of them are Robotlegs, PureVMC, Swiz and Parsly (there are also Cairngorm and Flex only MATE but I don't know have they still supported). They all managed to be the basis for your application and it's a matter of taste which of them to use. If I should make a choice of one on them it'll be the Robotlegs, but in real work we have own lite weight MVC implementation, something average between Robotlegs and Cairngorm for pure AS3 projects.
Related
WE have a finance and insurance product that build in Flex as front end and Java (EJB) as a backend using JBoss Application server, now we want to change the Front end from Flex to HTML5. the framework we are using in Flex is cairngorm that is I think best for flex to communicate with java using blazeds.
Now can anybody help me to choose the framework of HTML5, so that only Flex side will be replaced. As I told that application scope is very huge, thousands of flex files with custom components SWCs. please give me a proper framework so that I can raplace my Flex side with HTML5.
I think you can go with Sencha/extjs, the latest version of the sencha can accept the amf protocol data on the client side, so you can just put your time and developing the UI rather than rewriting the services, also, it is powerful like flex and backed by a huge community. GWT may be good replacement, but it has its own problems, you end up writing a lot of code in Java. People say JQueryUI is good, I've never used it personally.
Adobe has started developing IDEs around html5, checkout adobe edge.
What is the better framework for development Windows Store application?
I have used http://metroprism.codeplex.com/ but now I want to use Caliburn.Micro or MVVM light for another project.
I have looked through several application examples for these frameworks but they were not complicated enough for me to estimate usage in bigger projects.
These two ones are completely documented but the problem I think is that documentation for winrt mixed with WP7, Silverlight and WPF and I doubt a bit in supporting all features and practices of using exactly for Windows Store application.
Could you give me advice what is the better one? Or what are the good practices in development for Winrt with modularity supporting like in Prism for WPF and Silverlight.
Thanks.
MVVM Light and Caliburn.Micro basically do the same thing but they do it using opposing "philosophies of development" in MVVM.
MVVM Light is a "view first" approach. In this approach the ViewModel is instantiated in by the View. In MVVM Light this is done via something called the ViewModelLocator, a static class that binds a public property directly to the DataContext of the View.
Caliburn.Micro is a "viewmodel first" approach. Here you find that the viewmodel and view are created by an IOC mechanism that binds the two together. You navigate from viewmodel to viewmodel, with the views being generated in response to the navigation to a ViewModel.
They both have different features:
MVVM Light has a really nice messaging system for allowing view models to communicate with each other in a loosely-coupled way.
MVVM Light has a really simple mechanism for injecting design-time data into your views. Basically it swaps out your runtime services with design-time services that feed data to your viewmodels and, in turn your view. This makes design time data really easy to use.
Caliburn.Micro has an amazing data-binding setup, where it handles most of your databinding scaffolding for you. Basically, it maps the names of methods and properties to the names of controls in the view and autowires them. This saves lots of code and is a really, really nice feature.
Caliburn.Micro uses a "Convention over Configuration" mechanism to map views to viewmodels. MainView maps to MainViewModel, etc. This means you've got no configuration, you just need to make sure that you've got your naming conventions sorted out.
I've used both frameworks (Caliburn.Micro for WP7 and MVVM Light for Windows 8 Store Apps) and like them both for different reasons. MVVM Light is easier to start using but Caliburn.Micro is probably more powerful. I've found them both more than adequate for writing moderately complex applications quickly.
Caliburn.Micro gives you clean XAML at the cost of some magic. MVVM Light is a clean and simple framework that is easy to understand and works well. Prism seems to be a bit heavier than MVVM Light and more business app oriented - it does more than just MVVM. There are many things to consider. Choosing what you already know will let you focus on adding features, but learning a new framework can certainly be a good learning experience helpful in future choices - so you could pick something you haven't used before if you want to learn. You could also write your own framework and only include what you need. I usually go somewhere between roll your own and MVVM Light because that is what I know, though if I were to build a bigger enterprise app - Prism might be better suited for the task. I haven't used Caliburn.Micro because the novelty of different MVVM approaches wore off for me and I just want to create apps. With WinRT a roll-your-own-framework approach is easier than with any platform before because the basic project templates already give you some foundations as I wrote in my Minimalistic MVVM blog post. I would recommend that approach if you already tried MVVM and want to use only the pieces you need - the framework will grow with your app. You can just grab pieces of code from other frameworks if you need them or write your own implementations of the patterns you need.
To summarize
If you want to learn - try something you haven't tried before or write your own framework
If you want to create an app quickly and it is not a huge app - use what you know or go minimalistic and don't use anything but what you get from the templates
If you are building a big app with lots of features - consider Prism or rather first think whether Windows Store is the right target platform for you since it seems to be focusing more on simple in and out tablet apps
As far as I've been able to find, there seems to be one option for building websites/web applications in Objective-J with Cappuccino.
The .NET is a huge framework that of course can compile for the web. I don't think it's a stupid question to ask whether or not Objective-C can be used for the same purpose.
Apple doesn't advertise being able to develop websites with Objective-C, but I thought I'd ask anyways.
Other than Cappuccino, is it possible or just completely not possible?
It'd be possible to build websites in Objective-C, the same way you'd be able to do it in C++ or even C.
There are pros and cons to both. The main pro is that these languages are generally more mature, robust and better featured than php, ruby etc. However, since they are not generally used for that purpose (unfortunately), there aren't many frameworks and/or workflows available. The most recognized for Obj-C is GNUstepWeb.
You also have to consider what you're doing. If you're building a web application that involves models, reports, etc, this would be a good way to go. On the other hand, if you're building a smaller website with more common features, chances are one of the "traditional" web-development platforms is going to be a better match.
I thought you might be interested in something like Cappuccino (Aka Objective-J) which is similar to Objective-C (in some ways) but fully designed for creating web application front ends. It compiles to Javascript.
Your question isn't stupid - but it is very broad and hard to answer. Are you talking about outputting HTML? Or are you talking about server side programming? Objective-C using Cocoa, or just vanilla Objective-C?
To start with, anything using cocoa frameworks cannot be compiled for the web. Period. You can imitate the Cocoa frameworks (like Cappuccino does), but it is not a small task.
It is possible to do web development with Objective-c (server-side), but it is not really feasible at the moment because you would have to write the libraries from scratch, and with so many other options out there for web development with complete frameworks (Ruby, PHP, Python, Java, etc) there really isn't any reason to do so.
WebObjects was an Objective C framework, but transitioned to Java a decade ago. However, it still has the Cocoa/Obj C feel, still using foundation classes such as NSArray as well as key concepts like KVC and MVC. The Apple online store and the iTunes Store are two successful examples of web applications written using WebObjects.
Is it better to learn C# first and then ASP.NET or the reverse?
Best,
Gomanh
Hi first of all you need to learn some C# basics, because ASP.NET uses C# or VB.NET syntax.
I think you misunderstand some fundamentals :)
ASP.NET is not a programming language. Its a "framework", meaning its a collection of libraries and classes related to web development. You access the ASP.NET frameworks through a programming language, such as C#.
If you're new to C#, there's a good chance you're new to .NET as well. The .NET Framework (also called the .NET Base Class Library) is a collection of classes which wrap up common needs that arise in most applications. C# language is actually very easy, but learning the .NET framework can be pretty challenging.
ASP.NET is a framework that uses the .NET BCL. Its yet one more thing to learn.
In my opinion, you can learn C# and ASP.NET simultaneously.
Assuming you are already familiar with HTML, otherwise lead with that.
ASP.Net is a framework that uses C#/VB to generate HTML, so you'd get lost pretty fast without an understanding of HTML. You can't really get far in ASP.Net without learning either C# or VB, as Juliet says, so the two would tend to happen side by side.
I learnt from an earlier edition of this book - http://www.amazon.com/Sams-Teach-Yourself-ASP-NET-Hours/dp/0672333058/ref=sr_1_3?ie=UTF8&qid=1290212202&sr=8-3 otherwise highly recommend you spend some time on http://asp.net where they have excellent video resources for all levels.
I'm trying to get a few web development ideas off the ground. Unfortunately I will be the only developer, so I'm focusing on getting a good debuggable, testable setup going that I can develop applications rapidly with.
Which languages, development styles and frameworks would you recommend for rapid development? Last time I checked RoR was the next big thing but that was a while back.
Ruby on Rails is a good choice for rapid prototyping. It's simple, clean and easily learned. PHP also offers a fairly low learning curve and a wide variety of built-in functionality for accomplishing most tasks. Both languages have their shortcomings, but on small-team projects for low to moderate traffic sites, you aren't likely to bump up against them.
The one you know best.
For people who are comfortable with Python there's also Django.
I guess it is pretty much an equivalent to Ruby on Rails (although I never used Ruby on Rails). Django's concept is to have many autonomous applications which can be used together in order to build small to large scale websites. It has great documentation, although deployment can be quite a hassle. Unfortunately it's not supported by many hosters.
PHP with Zend Framework has comparetively lower development time.
If you are familiar with C# or VB.NET and HTML then ASP.NET is also a very good option.
Just to add another, GWT (Google Web Toolkit) is an awesome option. It allows you to write all of your code in one language (more or less, you'll still need a bit of css --for the record ASP.NET allows this as well) and you can create really rich applications with all kinds of awesome javascript and ajax stuff without needing to know javascript. Their tutorials are great and personally, I think you can get off the ground really, really quickly.
I guess it matters more as to what languages you're most familiar with.
Whatever that language is, look for a good MVC framework for it.