Search posterous

Search all posts and users. Type a name, type a favorite song title, whatever! See what comes up.
  

More posterous blogs











More recommended blogs »

Here are posterous posts filed under asp...

michelle says...

via Jeffrey Palermo (.com) by Jeffrey Palermo on 11/13/09

Background

Headspring has developed and donated Portable Areas to the MvcContrib project.  It currently resides in the MVC2 branch on the MvcContrib GitHub source control site.  Eric Hexter has written a multi-piece tutorial on how to create and publish a Portable Area assembly.

Download code here.

A Portable Area builds on the concept of an ASP.NET control, and it takes it a step further.  Whereas a control can encapsulate a certain part of the page to deliver rich functionality, a Portable Area can encapsulate an unlimited number of pages in a single assembly.  The Portable Area in itself is an ASP.NET MVC 2 area that is packaged in a certain way into a single .Net assembly.

Component vendors have offerings of rich functionality packaged up into web controls.  Now with MvcContrib layered on top of ASP.NET MVC 2, component vendors as well as you and I can package and distribute entire sections of functionality in a single binary.  Think of comprehensive user administration and diagnostics.  Think of executive dashboards and content management.  All this rich front-end functionality can be packaged and distributed while at the same time allowing for the application to examine and process messages being sent from the Portable Area.

For example, a dashboard portable area might need 5 key metrics based on the type of dashboard used.  It sends a QueryMessage to the application (via the Portable Areas bus) requesting these metrics.   A query message handler that the application defines accepts the query message and provides the metrics for the portable area to consume and publish on the rich dashboard.

In this application, I want to demonstrate how Portable Areas, while being based on ASP.NET MVC 2, are a generic ASP.NET component model.  This example, available via the MvcContrib CodePlex page, is a standard Web Forms application with the LoginPortableArea configured.  This is just the first sample portable area that is included in MvcContrib’s MVC2 branch.

Enabling MVC routes and views in a Web Forms app.

In you web.config, you will need to add the following section in your <pages/> element:

image

Also, you need to add the UrlRoutingModule to the <httpModules/> element:

image

You will also need a Site.Master page in the page where the Portable Area expects it.  This may be a future enhancement, but it must implement content placeholders for TitleContent and MainContent.  Use it to adapt the sections of your existing master page so that views delivered by the portable area fit nicely within your own master page.  Also notice the web.config file that must be in the Views folder (just copy it from an empty ASP.NET MVC project):

image

Registering the LoginPortableArea and handling messages sent by it:

In your Global.asax file, there are a few lines of code to register the portable area:

image

Notice that you are registering two classes of your own:

  1. LoginHandler
  2. ForgotPasswordHandler

We will explore LoginHandler, but download the code if you care to see the ForgotPasswordHandler.  We register handlers with the bus so that we have classes that can be created and passed the messages.  Here is what LoginHandler looks like:

image

Derive from MessageHandler<TMessage> or implement IMessageHandler fully.  Putting the type of the message in the declaration will tell the bus that this handler knows how to handle that message type.  It is possible to create a handler that can inspect ALL message types by implementing IMessageHandler fully. 

There are three types of messages that a Portable Area might send:

  1. IEventMessage : informational purposes
  2. IQueryMessage : requesting some information
  3. ICommandMessage : requestion the app to perform some action

All the message types are IEventMessage(s), and they all flow down the same bus.  There is a handler factory abstraction you can set so that you are in control of the construction of event handler classes.  The default that is built in is Activator.CreateInstance() – requires a no-arg constructor.

Once this is wired up, we can run our app and see the only page present, Default.aspx

image

This is our only Web Form in the application.  It uses some built-in login controls to show who is logged in as well as links to login and log out.  I have configured forms authentication in the web.config file.  We will run the browser and step through the sequence of screens:

image

We see that we are not logged in.  Let’s click the “Login” link . . .

image

Now we are in the Portable Area.  This page is not defined in our app at all.  Let’s type in a user name and password and click Submit. . .

image

Now it knows that I am logged in, and regular Web Forms gives me a handy “Logout” link.

Conclusion

This post has given us an example of how to consume an MvcContrib Portable Area from within a regular Web Forms app.  Furthermore, it demonstrates how to run ASP.NET MVC pages right alongside Web Forms pages.

Call to action for component vendors

Please flood the marketplace with richer components that span multiple pages.  The controls are nice and very useful, but there is lots of general functionality that can be bought instead of built by every development team.  Portable Areas work in ASP.NET MVC as well as Web Forms, so while the development model is MVC, the consumption and customer market is the full breadth of ASP.NET developers.

Filed under: asp

bredhead says...

I am not sure about these, they took ages and don't look right.

Filed under: ASP

bredhead says...

On our trip in the mountains.

Filed under: ASP

nikan says...

[full-time] SYSTEM – NETWORK ENGINEER at Syscom S.A.

Posted:

Location: Αθήνα
URL: http://www.syscom.gr

Description:

www.syscom.gr

Apply to this job

[full-time] WEB DEVELOPER at ΝΟΟΝ ΠΛΗΡΟΦΟΡΙΚΗ ΑΕ

Posted:

Location: Αθήνα
Description:

Ζητείται Web Developer με πολύ καλές γνώσεις HTML

PHP, MySQL, CakePHP, Javascript, Flash (επιθυμητή η γνώση Actionscript) Ύπαρξη portfolio. Βιογραφικά στο e-mail:hr@noon.gr

Apply to this job

[full-time] ΠΡΟΓΡΑΜΜΑΤΙΣΤΗΣ COBOL at ΝΟΟΝ ΠΛΗΡΟΦΟΡΙΚΗ ΑΕ

Posted:

Location: Αθήνα
Description:

Ζητείται προγραμματιστής\τρια απο εταιρεία πληροφορικής με γνώσεις Cobol. Θα εκτιμηθούν γνώσεις .NET Visual Studio 2005, Php&MySQL, MS SQL Server 2005. Στείλτε το βιογραφικό σας στο hr@noon.gr

Apply to this job

[full-time] ΠΡΟΓΡΑΜΜΑΤΙΣΤΗΣ ASP.NET at ΝΟΟΝ ΠΛΗΡΟΦΟΡΙΚΗ ΑΕ

Posted:

Location: Αθήνα
Description:

Ζητείται προγραμματιστής με εμπειρία σε τεχνολογίες ASP.NET, VB.NET
Στείλτε το βιογραφικό σας στο hr@noon.gr

Apply to this job

Filed under: ASP

bredhead says...

Something we cooked up one afternoon while on a school workshop.

Filed under: ASP

bredhead says...

Student work: ASP Wroclaw 2009

Music; Stereo Music for Farfisa Compact Duo Deluxe Drum Kit  by Keith Fullerton Whitman from Multiples

Wrote to Mr. Whitman and asked if it was ok and he liked it and said keep it online.

Filed under: ASP

cmshire says...

All applicants applying for U.S. job openings must be authorized to work in the United States.
All applicants applying for Canadian job openings must be authorized to work in Canada.

Directions:
1. Include your updated resume in Word Format
2. Please list your work authorization in the U.S.

Location:
San Jose

Rate $40/hr

A leading alternative energy company is looking for a .NET developer to help create high scale web applications.
This candidate will have to be able to work with the complete software development lifecycle.
You will be joining a team environment with one great benefits and room for growth!

More

Filed under: asp

agnoli says...

Just so you don't think its all champagne and caviar here on tour I thought I'd include an image of the Mundaka branch office of Surfline. 
Here we are hard at work processing images and writing copy for the Surfline coverage of the Mundaka final. Lewis is bitter about the image picks the home office has made, and just all around grouchy by 11:30 at night.
After surfing two sessions and covering the contest all day its kind of brutal to come back to the cabina and process/write for 5 more hours. Lewis has to write the main story, while I process images. Then we get the image picks from San Clemente, and Lewis has to caption them. Meanwhile I'm blogging the days events and answering mail. Generally we are wasted by the end of it all and rarely go out to drink. 
Usually the night ends with Lewis calling his girlfriend, and then vowing to me that he won't be surfing in the morning. I set the alarm for an hour before sunrise, read my book, and pass out.
cheers.

 


Filed under: asp

agnoli says...

                                           

Click here to download:
Billabong_Pro_Mundaka_08_-_Fin.zip (3303 KB)

Another day on the cliff, read my earlier post for pre-heat action, the story is that CJ won in smaller Mundaka. 

I mostly shot lifestyles on the cliff, the whole of the province was in town for the contest, or at least any one under 25 who was cool. Quite a bunch of friendly faces. All dressed in their Saturday best.
We paddled out at the closing horn as usual and surfed with the groms while CJ was trophied and then thrown from the dock as is the custom here.
Surfed OK, but not that great. Its good that they finished the contest today, because tomorrow will be flat, and the next swell isn't for a couple days. The press, the athletes, their wives and kids are all dreaming of home and that's where they are now headed.
The real story started when CJ invited Lewis to have a beer with the boys, some of who are not happy with his writings. After a few beers and slaps on the back one of the group cornered Lewis and started in on a heated discussion about the writes and wrongs of the power rankings and how it hurts careers and feelings. The moment we had all been waiting for and fully expecting. It was a bit like Kelly winning the title. Totally expected and somewhat of a let down in the end.
The ASP chaplain and I stood by mortified about what was going on to our right, having our own conversation, but monitoring just in case. But both individuals handled it with aplomb and there was nary a spilled beer in the end. Lucky because I had left my camera in the car and would have missed the money shot.

http://www.surfline.com/wct-contest-zone/back-on-top--cj-hobgood-wins-billabong-pro-mundaka-billabong-pro-mundaka-final-day_19086/1/

Filed under: asp

agnoli says...

We woke up early to surf the inner peak, it was good and almost hollow at times, as the tide sucked out we transitioned to the main peak where Lewis got a few bombs, i got a couple big ones, but not as good. Eventually the pros came out, the crowd formed on the cliff, and the judges delayed the call another hour.

So, I'm posting up between Occy on my outside, and Damien Hobgood on my inside. What's the protocol when you are clearly the worst surfer at the peak? I surfed a couple before bobbling a nice one, causing Damo to quip to Lewis. Occy wasn't having any luck either, failing to paddle into a bomb that Damien eventually got a barrel on. I caught another good one and decide to call it a day.
The throng on the cliff had grown to Saturday proportions, and the media clearly didn't have anything else to point their cameras at so I thought it would be good to not be part of the spectacle. Luckily I was paddling at 5 knots against a 5 knot current, and while the pros were getting free rides from the jet skis, I wasn't. So I spent a couple minutes floundering in front of the crowd before deciding to paddle for the harbor instead of the stairs. Eventually the kinder of the jet ski riders pulled up, I pulled myself onto the sled, and off we went. A much nicer way to ride.
As I walked up from the harbor Sherm was packing his car for France. He's going up to photograph Kelley, and then home. We will probably head up there tomorrow.
The surf here is getting smaller by the minute. Lewis' claim that he got the best waves of the day is probably on the money.

 

Filed under: asp