I’m looking into the new stuff in Asp.Net MVC 2, trying to figure out what is cool and what is just there. Areas look like a nice addition. Areas allow you to separate your Asp.Net MVC application into more distinct partitions. So all of the Controllers, Models, Views, and even routes belong to one directory structure. It is like having a sub-project inside of you MVC project.
Here is the problem, as I see it: as an MVC project gets large, keeping all of the necessary pieces and parts for a set of controller actions straight can get a bit daunting. I’ve ended up with duplicate folder structures in views and models, which can make navigation a pain.
To make a new Area, simply right-click anywhere in you MVC project, Add->Area. As I said, you can do this from anywhere in the project structure, but the Areas are created in a new “Areas” folder. When you name the Area, a new folder is created with the Areas name as well.
Once created you should see all the familiar Controllers, Models, and Views folders (all blank). In addition to that, you will see an <name>AreaRegistration.cs file. This inherits from AreaRegistration, and this is where any new Routes go. In the file is a prebuilt route that should look similar to this:
1: context.MapRoute(
2:"test1_default",
3:"test1/{controller}/{action}/{id}",
4:new { action = "Index", id = UrlParameter.Optional }
5: );
So a url to the area would include /test1/ (name of my Area) in the path. That would be good if you had multiple controllers with the same name, but if you don’t, just take out the “test1” and you won’t need it in the path.
Also, if you leave Area name in the route, you will have a little more work to, here is what one of mine looked like: <%=Html.ActionLink("test", "Index", "test1/TestArea") %>. But it turns out this is more correct:
<%=Html.ActionLink("test", "Index", "TestArea", new { area="Test1"}, new {}) %>
This also mean that any controller actions you want to link to outside if Area needs to include a blank area in the link, like this:
<%=Html.ActionLink("Home", "Index", "Home", new { area=""}, new {}) %>
In case you are wondering, the first object in the area is for route values, the second is for html attributes.
So the downside of using Areas is that you could complicate your routing in a hurry. Plus it does not look like the Html helpers are there to lend you a hand either. It is very doable, just annoying. Of course, the easy fix is to remove the Area name from the route and move on. That should be ok so long as you do not have two controllers with the same name.
So are Areas a compelling feature? I think so. Plus, the larger the site, the more compelling Areas can become. For smaller sites, probably not. But I would not say no either.
Thinking about jumping on the cloud? True, I’ve had no qualms in showing my skepticism towards the marketing of ‘cloud computing’ and it being the mere repackaging of solutions which have existed for years, but the fact is it still addresses a concept and reality that exists and one which holds numerous benefits. Indeed abandoning an existing on site IT infrastructure for a cloud provider that most often or not can’t offer the same level of security, control or performance is not an easy decision but one which CIOs and IT executives are seriously considering when weighing up the economic benefits. As with any change though, a move towards the cloud necessitates a sound and comprehensive assessment to avoid the trap of a short term benefit turning into a long term nightmare.
Is your website available to end users 99.8% or more of the time? If not, then count yourself in the “laggard” category, according to standards set by The Aberdeen Group, in its 2008 report “The Performance of Web Applications: Customers are Won or Lost in One Second.” In that study, laggards had web application availability only 86.3% of the time.
If 99.8% of the time seems a little unrealistic to you, consider the title of Aberdeen’s study – and that you can lose a customer in one second (to a competitor) if any part of their online experience goes sour.
ASP.NET MVC 2 has been released (yay). One of the pieces I like about it is in the MvcFutures assembly. MvcFutures is where the MVC team puts code for features that may or may not make it into a future version of the MVC framework – undocumented, somewhat risky, but hey you get all the source code if you find yourself painted into a corner.
One of the long-standing MVC practices has been ‘Shun Magic Strings.’ For example, rather than specifying Controller/Action names in an ActionLink by string, we’ve always used an Expression<Action<TController>> instead to define the Controller class and Action method “in code.” If the action changes in the future, this gives you somewhat better abilities to discover the problem sooner vs. later.
MvcFutures includes a version of this idea, taken to the next level: you provide the expression with the arguments you want passed to the action included – you don’t provide a 2nd anonymous type defining the arguments. This gets rid of the somewhat confusing “null” arguments inside the expression, and just looks better overall. Plus, if the arguments to the action change, you’ll get better warning of that as well.
The implementation that makes this happen is in Microsoft.Web.Mvc.Internal.ExpressionHelper. Which even though it’s in an “Internal” namespace, is neither marked Internal, Sealed, or otherwise made unavailable (hallelujah). So you can use this trick for all sorts of things.
There is also a System.Web.Mvc.ExpressionHelper in the official MVC assembly, which is used to implement the smart Html.TextBoxFor(m => m.Property) functionality. This class is also NOT internal, not sealed, not obfuscated and hidden away. We’ve used it to extend the Html.[control]For() abilities to some other control types. Very useful stuff. Plus its just interesting code to read.
One potentially big caveat: I’m told that the Html.ActionLink<TController>() methods don’t work if you’re using Areas in your MVC application. I haven’t tried this myself, we aren’t using Areas in any of our MVC 2 applications yet. That might be why this functionality is hidden in MvcFutures and not out with the rest of the smart expression code.
Orchestra explains how we use Cloud Computing and how it can benefit many small businesses. Cloud computing allows us to lower our IT costs, keep out IT resources scalable, and provides greater security and stability than we can ourselves. Find out more about how cloud computing can benefit small business in this great article.
Within the $79 billion--which is actually a slight reduction from the 2010 budget--there is a $50 million allocation for cross-governmental experimentation, as nicely reported by Wyatt Kash in the far-more-responsible-than-BW publication Government Computer News. Kash further reported that the Bush administration requested $35 million for similar funding, but was granted only 10 percent of that amount.
.toolbox is a free online training program where designers and developers can learn to create Silverlight applications using Expression Studio and to apply basic UX concepts to their solutions.
A new third generation of tools for Big Data is now emerging that offer the scalability, parallelism, performance and data flexibility of tools like Hadoop, but, unlike Hadoop, can also continuously process realtime data streams. Moreover, these new tools are as easy to use as a spreadsheet.
Do you remember?.. The first time you played with pieces of modeling clay, melting them in your hands and going deeper and deeper into the colourful plasticine world where your imagination was the only limit. Since the 19th century, when Franz Kolb and William Harbutt independently of each other invented plasticine (modeling clay), it has been used in almost all fields of art: illustration, web design, typography, claymation, installation design.
Plasticine artworks can be found just everywhere: advertisements, book/magazine as well as CD/DVD covers, movies / TV series, music videos, computer / console games, and even web design elements. Below you will find a collection of beautiful plasticine artworks that hopefully will inspire you and give you an idea about how this material can be used in your next design project.
[Offtopic: By the way, did you know that Smashing Magazine has a mobile version? Try it out if you have an iPhone, Blackberry or another capable device.]
Clay animation, or claymation as it is popularly known, is one of the types of stop-motion animation which is extremely laborious. Each animated piece is sculpted in plasticine clay. Some of the best-known clay-animation artists and studios include Will Vinton, Aardman Animation, Art Clockey and many others.
What is your opinion on plasticine art? In case any exceptional plasticine works haven’t been covered, please feel free to use the comments area to share your thoughts and suggest other beautiful works. We are looking forward to your feedback and your thoughts!
Rackspace has picked up the Drizzle team that Oracle cast off when it acquired Sun.
In case you don’t know, Drizzle is a cloud-directed, Linux-leaning, stripped-down, hitherto for unsupported, GPL 2 MySQL 6.0 fork that Rackspace is betting will infinitely scale, or at least scale better than MySQL.
It looks like Rackspace means to go to production with the thing this year. Hopefully it will be stable.
Drizzle runs the risk of not being as stable as MySQL, because the Drizzle team is taking things out and putting other stuff in. Of course it may be successful in trying to create a product that’s more stable than MySQL. But creating a stable DBMS engine is something that has always taken years and years.