Build new joomla Component in Legacy or Native classes? - joomla

I am starting to develop my very first joomla 3 component.
Should I choose legacy or native classes and why?
What about support in the future?
Joomla core components use Legacy classes. Are they gonna be removed in the future?
Thanks!

If you are starting Joomla! development right now, my opinion is to start using the legacy classes. From my knowledge, the legacy support will be in the next major release (3.5) as well in the current STS releases (3.1, 3.2).
What is going to happen in the future is rather a thing that will be discussed, software is evolving, so is Joomla.
You should learn using the legacy classes because:
you will find most of the documentation / books / support about them
core components are build using them (and understanding how core components work, is a key to your success in developing extensions).
Native classes:
are rather poorly documented
not so many examples (for example just the Joomla installer is using them)
not so many use them, so getting support might be rather difficult
it good to have a look at them one you have more experience with Joomla, so that you can understand the benefits
they don't have the powerful JModel that the legacy classes have, so building CRUD functionality will require more code to write and mentain
there are no clear rules on how the code should be organised, so this for a beginner may be confusing, not having a pattern to rely on.
Hope this helps.

Related

Model-View-Controller for GWT

I know that most GWT based application now is being implemented using the MVP pattern, however I still want to know which MVC framework is the most mature and can be used for production-grade web application built with GWT.
Searching the web I can't seem to find a MVC framework anything comparable to Mvp4gwt and GwtPlatform in the MVP frameworks, in terms of user base and activities in the code.
If you must shoot yourself in the foot, these are the only two MVC frameworks for GWT that I've heard of:
http://code.google.com/p/gwt-mvc/
http://code.google.com/p/gwittir/
Neither of these have had a release in over two years. Probably due to lack of community interest, and because MVP is better in every conceivable way. Using MVC with GWT is like installing square tires on a Ferrari.
You could use JetPad-Mappers, a minimalistic MVC framework developed at JetBrains and used in several (currently unreleased) products.
https://github.com/JetBrains/jetpad-mapper
Disclaimer, I am involved in development of this framework.

Capuccino alternative with a comparable looking UI?

I'm looking for a set of Javascript based UI components for a web app I'm building and have found that many of the best looking web apps were built with the Capuccino framework; see http://www.getflow.com/, http://www.picsengine.com/home/ and http://timetableapp.com/ for examples.
However, I'm not a Cocoa developer and have no interest in learning Objective-J. Ideally, I'd find a set of components that provide the visual end result of Capuccino apps without the underlying weight of the framework.
I have seen the Aristo jQuery UI them (http://taitems.tumblr.com/post/482577430/introducing-aristo-a-jquery-ui-theme), but jQuery UI just doesn't seem to have the depth of components available in Capuccino.
I realize this may be a long shot, but I figured it can't hurt to ask. :)
Thanks.
As another option, there is jQuery UI: nice if you are already familiar with jQuery, with the plus side of not being too heavyweight, but may not have all the components you need pre-defined. A nice thing is that it encourages to write the HTML in a way that degrades gracefully when your application in older browsers.
Maybe sproutcore is an alternative for you, although it requires you to hand-code everything in javascript from scratch. It offers most basic components and is easily adjustable to your personal design goals. Sproutcore is used in Apples Mobile Me and in some other big projects.
Another possibility might by vaadin which offers a rich set of prebuild controls and is based on Googles GWT javascript compiler. But it only makes sense if you are developing in a java environment.

MVC3 - lightweight CMS that can be added to existing application?

I'm trying to find a CMS that can be incorporated into an existing MVC3 app.
I've played with N2, and can't get the damn thing to work in VS2010 or with .NET 4.
Umbarco doesn't appear to support MVC yet
Orchard looks great, but wants to own the whole application.
DNN is just a mess.
Any other brilliant solutions?
Post-mortem Dec 2011
This is an old post, but I thought I'd share my experiences with Orchard, and why I decided to go a different direction.
NHibernate
Aside from the very large number of transactions per page (literally dozens in some cases), each and every query was executed using sp_executesql. While not quite as bad as using Exec(), this rubs me the wrong way. Currently, my database is locked down so that applications can only execute stored procedures - that is, they can't perform select/update/delete, list entities such as tables, get any metadata, etc. This is a requirement for tier-wise unit testing, compile-time verification of the database, security and encapsulation of database logic from the application code.
Source Deployment
Orchard requires that the entire source for your site (views, .cs source files, etc) is deployed to the production server. The sheer number of source files that need to deployed boggles the mind.
Integration with an existing application
The manner in which Orchard is structured effectively requires it to be the point of entry for the web application. This means that you're going to spend some time modifying and reimplementing your app to get it to play nice with Orchard.
Conclusion
There were quite a few other issues that I encountered, but those are the highlights. Individually, each of those could have been a deal breaker. Together, they removed Orchard as a viable solution.
I'm now evaluating Telerik's Sitefinity. It's not MVC, which saddens me, but:
The admin interface is extremely powerful. Aside from a master page and some stylesheets that I put together in VS, we've been able to handle all of the layout via Sitefinity's admin tools.
I mean, it's really powerful. You can use the admin interface to edit the admin interface. Think about that for a minute.
Widgets are implemented as ASP.NET user controls. Most of my existing controls just dropped right in with zero modifications.
Database access is handled via Telerik's OpenAccess ORM. While Sitefinity doesn't natively use stored procedures, OpenAccess fully supports using them for all operations. Also, according to Telerik, OpenAccess does not, in any way, rely on reflection, which provides significant performance benefits in heavy-load apps.
There are several solutions available for using Razor markup within widgets, which is one of the great benefits (to me) of using MVC. Also, I've been told that native Razor support is in active development.
It's not free. In reality, however, a few grand barely breaks the noise floor in terms of development time.
Super crazy fast. Startup time is a bit on the slow side, but once it's running, it's very quick.
Built on top of Telerik's awesome, proven RAD controls.
Apologies for the long post. Hopefully this will be helpful.
You might find these projects useful. You can probably model a simple CMS based on one of their projects.
MvcCms
MvcMS
Atomic CMS
Mytrip.mvc
Try Web Noodles..The new CMS developed using mvc3. WebNoodles.It is easy to integrate .But the thing is it is still in beta stage..But you must give it a try ...

MEF vs. PRISM. What is the difference? What will be supported in the future?

What I want to create is a Silverlight app with a few tabs/modules that will all be separate DLLs.
I see PRISM has the Shell/Module concepts that seem directed towards doing UI and I find a nice demo (showing how to search digg/twitter).
But it sounds like MEF will be included in VS2010 so I would like to go with that option.
Can anyone somehow clearly explain the differences? (I am not a advanced programmer)
MEF and Prism serve two very distinct goals.
Prism is basically guidance for designing composite applications - where you have a shell and "regions" that are dynamically assigned, and integrated. It includes an IoC container (Unity) that it uses for it's injection.
MEF is a dependency injection framework - it's main goal is to "fill in" depedencies at runtime for an application. In this respect, it's filling the same goal as Unity does within Prism (and, in fact, you could pretty easily rework Prism to use MEF instead of Unity).
Prism fills a broader scope, in some respects, but is also really limited to GUI applications. MEF is just doing one thing (Dep. Injection), but geared to be more general purpose, for any type of application.
As for the lifetime of these products -there is no answer here, but this is kind of how they're being developed:
Prism was developed by the Patterns and Practices team. The goal isn't to necessarily make software, but to provide guidance. As such, they update (although somewhat infrequently) the Prism library and sample, but Prism isn't a core part of the framework shipped by Microsoft. It's really a third party library (even though MS funds a lot of it, most of the P&P people aren't MS FTE).
MEF, from the blog posts, sounds like it is planned to be integrated into the framework, and be used directly inside of MS projects. As such, it's getting heavy development, directly from Microsoft, and being used in their products.
I, personally, have read through the Prism documentation (and have the book), and have gone through the samples. It is very helpful to understand how to break apart an application, but it really is guidance more than a complete, usable framework. The samples are very good at doing what they're designed to do - educate an architect in how to design a composite application.
If your goal is to just keep a clean separation of concerns in a silverlight application, I'd focus more on learning MVVM than necessarily just using Prism.
If you want to use MEF, there are other good options. For example, the WPF Application Framework is an entire MVVM framework built on top of using MEF, and fairly nice.
Basically, MEF is a general-purpose extensibility framework:
If you are building extensible applications, extensible frameworks and application extensions, then MEF is for you.
whereas Prism is mostly for building GUIs:
The Composite Client Application Guidance is designed to help you more easily build modular Windows Presentation Foundation (WPF) and Silverlight client applications.
So MEF and Unity are basically the same...
Well, not exactly. MEF is more focused on extensions which aren't known at compile time, while IOC containers generally focus on dependencies which are known at compile time. The top answer to this question gives a good explanation of the differences.
Yes. Check these two posts for more:
http://blogs.msdn.com/gblock/archive/2009/12/02/mef-and-prism-to-be-or-not-to-be.aspx
http://blogs.msdn.com/dphill/archive/2009/12/09/prism-and-mef.aspx

Which are the J2ME MVC frameworks?

I have to do a quite big project in J2ME for school.
I didn't used 'till now J2ME, so are there J2ME MVC frameworks
for which I can find books or at least very good online tutorials?
MVC is what I'm looking for because we have to do unit testing and
I'm familiar with MVC from ASP.Net MVC, Rails and Grails.
So, any good framework to use with this project?
We are developing this project for Blackberry cells.
With Java you don't really need a framework, creating MVC-based apps is just about using the principles correctly, so having controllers dictating the response to any action and so on. I'd think about using Observers to help by having your views observe your models and controllers observe your views (to get events and so on.) Unit-testing this then becomes quite simple.
If only, the fact is that every handset is very different - its extremely difficult to build an app that spans all the major J2ME-capable handsets that looks half way decent by following the basic principles. Which is why we end up doing things like using sprite based fonts (ugh). I don't think I've ever worked a mobile project using J2ME where we've managed to stick to just the standard J2ME (and, we try very hard). Even things that should be standard, like reading a JSON feed from a server, persistent storage or even really simple things like sprite rotation is really not very standard at all (yes, I'm looking at you RIM). And, then throw a requirement for Android into the mix and you're done.
I've used Polish, and its really very good. Commercial license is not cheap (but worth it), but for a school project its free. Flash (cough) is also a good alternative too. These days, personally, I find my projects need to span iPhone (Objective-C), Android (Java), Nokia (J2ME) and Blackberry (pseudo-J2ME) and it gets real tricky to not use a commercial framework (or roll your own, if you've the time and inclination). I'm open to ideas for frameworks that span all those platforms?
I'm not sure anything like this exist, as mentioned by previous poster, you just follow the principles of the pattern. However, look at J2ME Polish, it's a very nice framework which makes your life with mobile java much easier. Particularly strong features they offer is the usage of CSS for displays - this gives you pretty good "V" part in MVC pattern.

Resources