Dojo or flex with Grails? - apache-flex

I plan to build a database management system using Grails as the main framework. On the client side, I'm thinking whether to use dojo or flex to make a nice front end.
Could some experts here enlighten me on the pros and cons of choosing either, or both?
or any other options?
thanks!

I tried using Dojo in a project and even brought a few books. And while Dojo Looks good I found that JQuery and JQuery-UI was a lot lighter and worked faster.
This is just my opinion and it may help you.

From the description of the flex plugin at http://www.grails.org/Flex+Plugin
"This plugin was created as an experiment to prove that it's possible to communicate from Flex to Grails services without any configuration in Flex. There
is no plan to add functionality or whatsoever. It's not sure if the plugin works in production mode as it is only tested in development mode. This plugin
can be seen as an example on how to integrate Flex and Grails with Convention over Configuration in mind."
There is no scaffolding generation for flex, see this bug
Another disadvantage of Flex is its lack of accessibility for screen reader users with the default configuration. There is some work being done to address this but it isn't publically available yet.
I don't have experience with DOJO but according to this link if you use the standard Grails Ajax tags you should be able to switch libraries with out to much trouble and won't be tied to Dojo. For fancy UI stuff such as tabbed interfaces and data tables I've found GrailsUI works well for me. A demo project showing its features can be found at http://code.google.com/p/guidemo/ although you'll have to check the code out to run it.

I am developing an information-management application with Dojo 1.9.2 and Grails 2.3.9 (lots of simle/complex forms, listing screens...etc). The application has a single-page interface as well (a workspace) which was the primary reason for a heavy JavaScript library.
Overall, Dojo is fairly suitable for this kind of workload and I haven't bumped into any show-stoppers yet.
I needed to do a lot of work on integrating the Dojox DataGrid into the application (extending QueryReadStore to fit with Grails better...etc) and a set of custom widget extensions (e.g. a real, working AutoComplete).
After this larger, initial integration work is done, you can expect a fairly smooth ride.

Related

Adobe recommends not to use DataGrid for MobileDevice profile

I want to display sharedObject's data inside a DataGrid but I saw in the online documentation that "Adobe recommends that you not use this component in an application that uses the mobileDevice profile.". So what are the alternatives for DataGrid in mobile-flex ?
Your documentation reference is a bit outdated. Flex has since moved to the Apache community and is no longer property of Adobe.
And lucky for you one of the consequences of this move is that some company (can't remember which one) was kind enough to donate its mobile version of DataGrid to the Apache Flex project.
Here are the docs: https://flex.apache.org/asdoc/spark/components/MobileGrid.html
It's still marked as experimental, but since this comes from a company you know that it has been used in production already. I did some preliminary tests with it and it worked as expected.
You'll have to install Apache Flex 4.11 to use this component. Just got to http://flex.apache.org/installer.html and use the installer app.

How to make custom UIComponent Accessible?

I added a MXML component in flex and selected the base as UIComponent. I want to make it accessible so that automated testing tools can Access it. I am using TestComplete for automated testing. As TestComplete uses Microsoft Accessibility classes. Now it treat my component as the Graphics.
How Can I do this??
It should work, if the application was correctly prepared for testing with TestComplete. Check the Preparing Flex Applications for Testing with Automation APIs topic to learn more.
You won't have much luck automating Flex using MSAA, because the object hierarchy and information reported by MSAA is very limited. To improve things, you could try compiling your application with accessibility enabled and also creating a custom accessibility implementation for your component. However, I doubt it will make much difference.
Having said that, you should really consider upgrading to the TestComplete 8.20, because this version has proper support for Flex. By "proper" I mean that it identifies all objects inside Flex applications (including custom components), provides extra test objects for automating Flex controls and also lets you automate controls using their native properties. In addition, this version can dynamically load the testing library into Flex applications, so that no changes to the application's source code or build process are required.
Please look at the official documentation about Creating Applications for Testing
Especially the part about instrumenting custom components

Thoughts on streamlining multiple .Net apps

We have a series of ASP.Net applications that have been written over the course of 8 years. Mostly in the first 3-4 years. They have been running quite well with little maintenance, but new functionality is being requested and we are running into IDE and platform issues. The apps were written in .Net 1.x and 2.x and run in separate spaces but are presented as a single suite of applications which use a common navigation toolbar (implemented as a user control). Every time we want to add something to a menu in the nav we have to modify it in all the apps which is a pain. Also, the various versions of Crystal reports and that we used tables to organize the visual elements and we end up with a mess, especially with all the multi-platform .Net versions running. We need to streamline the suite of apps and make it easier to add on new apps without a hassle. We also need to bring all these apps under one .Net platform and IDE.
In addition, there is a WordPress blog styled to match the style of the application suite "integrated" into the UI and a link to a MediaWiki Wiki application as well.
My current thinking is to use an open source content management system (CMS) like Joomla (PHP based unfortunately, but it works well) as the user interface framework for style templating and menu management. Joomla's article management would allow us to migrate the Wiki content into articles which could be published without interfering with the .Net apps. Then essentially use an IFrame within an "article" to "host" the .Net application, then...
Upgrade the .Net apps to VS2010, strip out all the common header/footer controls and migrate the styles to use the style sheets used in the CMS.
As I write this, I certainly realize this is a lot of work and there are optimization issues which this may cause as well as using IFrames seems a bit like cheating and I've read about issues with IFrames.
I know that we could use .Net application styling, but it seems like a lot more work (not sure really). Also, the use of a CMS to handle the blog and wiki also seems appealing, unless there is a .Net CMS out there that can handle all of these requirements.
Given this information, I am looking to know if I am totally going in the wrong direction? We tried to use open source and integrate it over time, but not this has become hard to maintain. Am I not aware of some technology out there that will meet our requirements? Did we do this right and should we just focus on getting the .Net streamlined? I understand that no matter what we do, it's going to be a lot of work. The communities considerable experience would be helpful. Thanks!!
PS - A complete rewrite is not an option.
Hmm, we're in the midst of a project to do something that sounds familiar. We're using www.sitecore.net CMS but you could use the Open Source alternative Umbraco again both of these will have a learning curve, but they're .Net apps and aren't targetted specifically at blogs. SiteCore ultimately can use normal .Net user controls if you want, though it's slightly against their model, but it works.
One thing I'll warn you of is SiteCore Must be the root of your website, it has to control the root of the domain (it has a urlrewriting module that needs to be at the root) and you can tell it to exclude certain folders where your applications might live. You can obviously put your navigation in a folder under the root of the site. Also note SiteCore's a .Net 3.5 application running under the 2.0 runtime.
Are your sub-applications.. Actual seperate applications in virtual dirs or something I'm guessing?
Depending on the nature of the .Net apps, you may find DotNetNuke to be a useful choice.
It's a CMS where you write widgets ('modules') in .Net, then add them to the pages of the CMS. In your case, you'd wrap your existing functionality in such widgets. I've done exactly this several times, and now that I'm used to it it's no big deal.
The downside is you have to learn to swim in the DNN environment, which (like any CMS) has a bit of a learning curve.
I'd have to know a lot more about your existing apps to be sure this is a plausible option. If it looks appealing, you should probably contact someone who's dealt with a situation like yours (such as myself) and go into detail. It's very easy to find yourself in a dead end with these CMS frameworks.
Edit: Like a product mentioned in a different answer, DNN has to control the top level of its subdomain -- all requests begin by going through Default.aspx and are then dispatched in various ways.

Is there a Django or Rails for the .Net Platform?

Now before I dive too far into this this question, I am aware of nDjango and MonoRail; however, those project seem to be lacking.
What I'm wondering is if there is a solution out in the .Net world that has the following features out of a single box like Rails has in Ruby or Django has for Python. I know tools that do pieces but am curious if there's 1 unified solution out there.
Database Versioning/Migrations
ORM or similar code gen
MVC-based
Pre-generated administrative screens
View generation
Theming / styling
(I'm sure I'm forgetting another cornerstone feature)
There's lots of options that cover one or more of these aspects but is there something in .Net that covers all of them?
Thanks
I have not yet found a solution as you have described, but as you know there are bits and pieces that could be used together to provide a stack that is close:
Database Versioning/Migrations - DotNetMigrations
ORM or similar code gen - Nhibernate, Entity Framework
MVC-based - native to ASP.NET MVC
Pre-generated administrative screens - PLINQO
view generation - available in Entity Framework or CodeSmith templates, PLINQO
Theming / styling - native to ASP.NET
This would provide a stack that is .NET and not another ecosystem sitting on top of a .NET substrate.
You can actually run Rails under the .NET DLR. This allows you to not only access the feature set Rails provides, but also everything else which is available in the .NET ecosystem.
I haven't found a one click installer which gives me everything on your list, but, as you say, I have found excellent solutions for each point on your list which integrate well.
I'm honestly not sure how close this gets you, but S#arp Architecture seems to be trying to cover a lot of this ground in a single package.
There is a django for .net, the name is django!
In the web there is a lot of post about django running with ironpython (a implementation of python for the "virtual machine" of C#, CLR, i think)
there is also ndjango - the django templating language written in f# for .net. you can use it with bistro or asp.net mvc (or whatever else that you plug it into)

Add ons in a compiled language

We are developing a CMS in ASP.NET. We love the idea of add-ons (like in Wordpress, where any developer can add a menu button or a widget) and would like to enable developers to do the same with our system.
However I think that the fact that C# is a compiled language is an obstacle in the way of add-ons.
Am I right? Or is there a way to create add-ons for a ASP.NET application?
The fact that C# is a compiled language isn't a problem at all. In fact the .NET framework should make it relatively easy to load other code (just as Java does, for the same reason). Look into the Managed Extensibility Framework, which is all about loading Add-Ons in managed code.
It's not an obstacle at all. MEF has already been mentioned, you could also use:
System.Addin
Mono.Addins
I'm not sure for ASP.NET specifically, but in the only compiled programming language I know (Objective-C/Cocoa), there's the concept of Bundles that can be loaded dynamically. I'm not sure how that works on the backend, but I'd guess that there is some similar system for C#/ASP.NET.
I don't know how it's done in Wordpress, but there should be many ways. You can allow developers to upload their assemblies with compiled code or you can allow them to upload code in C# or IronPython or anything that supported and compile it dynamically. Maybe you can use WebParts for your task.
Microsoft has created the Managed Extensibility Framework (MEF), specifically for this problem: providing .NET plugins for .NET applications. It is the framework that (future versions of) Visual Studio use for writing managed plugins.
However, please consider using a dynamic scripting language for this! Problems like this are exactly what they are specifically designed for. If you host the Dynamic Language Runtime in your application, it not only means that your users can extend the application in a scripting language, but even in any dynamic language (scripting or otherwise) for which a DLR implementation exists: Ruby, Python, Smalltalk, Scheme, JavaScript, PHP, you name it. Biggest disadvantage: the DLR hasn't been released yet.
In C#, you can create any assemblies, link them as DLL files and then do whatever you want.
The usual case would be to define some kind of Plugin Interface which must be implemented by all the plugins.
Then you can load all plugins from the filesystem (by iterating over the plugin DLLs), find the class inside which implements the interface, instantiate it and work with it.
If you want to provide plugins with unloadability and security, you could create an application domain and load the plugins to that, increasing complexity, but also increasing stability (a bad plugin won't crash your app).
Please ask more specifically if you want a specific answer :-)
It's not too difficult to put hooks in place. You have to define in advance where the add-on features will appear. For example: when drawing a menu you can use reflection to search other dlls (with specific names and locations) for a "BuildMenu" function. You'll be defining the API for this function signature. It may have to return a list of items to be added to the base menu items collection.

Resources