Archives

Archives / 2008 / September
  • The .NET Coffee Break show with Sidar Ok - Using POCOs as Linq to SQL entities

    Join our next webcast! 2nd of October 2008

    Developers.ie invites all our members to attend our regular webcast.
     Sidar Ok
    Our next speaker is Sidar Ok, with a talk on Using POCOs as Linq to SQL entities.
     
    Sidar Ok is a Senior .NET developer in Decare Systems Ireland based in Cork, and is a regular blogger and a contributer to many Open Source projects and MSDN Forums. He holds an MCPD.NET, ASP.NET 3.5 Certified Specialist, and lately developed 2 live enterprise applications who are live now with Linq to SQL. He is going to share his thought and experiences on this.
    You can find his blog on http://www.sidarok.com.

    In Domain Driven Design, keeping infrastructure related concerns out of the domain is essential, and it is called Persistence Ignorance (PI). To achieve PI, the entities should be pure POCOs.

    In this show Sidar will discuss these concepts, how they relate to linq to sql, and show how to achieve implementing persistence operations without having to reference persistence related code in the entities.

    This will be broadcast live on Thursday 2nd of October at 11:00 (Irish time!)

    All the connection details to the show will be sent to you a few days prior to the start of the webcast.

    This event is free but you need to visit our new Webcasts section to register!

     

    Read more...

  • .NET event in Dublin - Josh Holmes - Developing RIAs with Silverlight 2

     

    09/10/2008 - Dublin - Josh Holmes - Developing RIAs with Silverlight 2
    Location: Morrisson Hotel Dublin

     

    Summary

    Rich Internet Applications (RIA) provide a similar user experience than traditional desktop applications combined with the ease of deployment of web/browser based applications. We explore architectural patterns such as state management, fault tolerance, service composition, communications protocols, message formats and go into details how RIAs can be developed using Microsoft Silverlight 2.0.

    Speaker: Josh Holmes 
     
    Josh HolmesJosh Holmes is a RIA Architect Evangelist with Microsoft focused on building and educating the dev partners with a Rich Internet Application offering. Prior to joining Microsoft in October 2006, Josh was a consultant with SRT Solutions working with a variety of clients ranging from large Fortune 500 firms to smaller sized companies. In most situations, Josh was called in as the technical leader on a project to lead the clients team to success. Josh is a frequent speaker and lead panelist at national and international software development conferences, including VSLive, Software Development Expo (East and West), Basta and the Rich Web Experience, focusing on emerging technologies, software design and development with an emphasis on mobility and RIA (Rich Internet Applications).
     
    Josh has written and delivered many training classes over time for both public audiences as well as courses tightly tailored for the client's needs. The topics of these classes ranged from XML to ASP.NET to the Compact Framework. Josh speaks from his experience and conviction based on many production successes that his clients have experienced. Community focused, Josh has founded and/or run many technology organizations from the Great Lakes Area .NET Users Group to the Ann Arbor Computer Society and was on the forming committee for CodeMash. You can contact Josh through his blog at www.joshholmes.com.
     

    Read more...

  • Google Android alias the Evil Cloud

    Like many on this planet, I followed today the official launch of Android by Google.

    Personally I am not impressed, and I noticed very quickly some issues. First it's Google, so what you got with your Android Mobile is more or less a portable version of their application.

    On this video, Google argue that even if you break or lose your phone your data is safe. And where you think they store it? Of course in Google data centers. Now sorry but that's creepy. I have never been an advocate of the Cloud, but man this is really scary.

    By using the T-Mobile device you are giving all your data (contacts, emails, calendar) to Google! Now of course for them it's business as usual, but for me I prefer my Windows Mobile phone (even if it's not perfect) where I can choose what I want to do with my data.

    Wait to see Google AdSense will probably be push everywhere too!

    Now for the UI design, well not quite right yet. What I see on this video is confusing, ugly in some points, and more like a rip off of what I have n my Windows Mobile phone. Where is the innovation promised by Google?

    At least the iPhone has the cutting edge regarding the interface. Also after watching twice the video, I am not convinced about the speedy response. Wait and see in real world is this UI is that fast.

    So long Android, I prefer to keep and control my own personal data.

     

    Read more...

  • What are the hidden features of Asp.Net?

    There are always features that would be useful in fringe scenarios, but for that very reason most people don't know them.

    What are the ones that you know?

    Summary of Answers: Here's a list based on the answers put in by everyone so far:

    • Use of HttpContext.Items for caching request level items.
    • Using HttpContext.IsCustomErrorEnabled
    • Use of HttpModules.
    • Enabling Trace from code based on QueryString Parameters and using Single Code Behinds for multiple ASPX Pages: Link to answer for code samples
    • For testing, you can send emails to a folder rather than a SMTP server with a simple change in the web.config: Link to answer for code sample
    • In ASP.Net 3.5 SP1, customErrors has a redirectMode attribute which allows showing error pages without changing the URL. Also, the form tag now recognizes the action attribute. Great for when you're using URL rewriting.
    • Setting Server Control Properties based on Target Browser: article
    • you can put an asp.net app offline simply by placing a file called app_offline.htm in the root. All new requests redirect to this file.
    • you can throw an HttpException which will be caught by Asp.Net and the corresponding customError Page will be shown. Link to answer for code sample

    Read more...

     

    Read more...

  • Setting Server Control Properties Based on Target Browser

    You can set a different value for a property for IE than for Firefox - and for anything else. I didn't try all properties, but I did try many that would matter, such as Text and OnClientClick etc, and they do work. Take a look at the following markup:

    <asp:Label runat="server" ID="labelText" 
    ie:Text="This is IE text"
    mozilla:Text="This is Firefox text"
    Text="This is general text"
    />

    <br />

    <asp:Button runat="server" ID="buttonText"
    ie:Text="IE Button"
    ie:OnClientClick="javascript:alert('Hello IE!');"
    mozilla:Text="FF Button"
    mozilla:OnClientClick="javascript:alert('Hello Firefox!');"
    Text="General Button"
    OnClientClick="javascript:alert('Hello everyone else!');"
    />


    Notice the "ie:" and "mozilla:" prefixes on the Text and OnClientClick properties.

    Read more...

     

    Read more...

  • Taking an ASP.NET Site Offline with a Message

    This was another one that I was literally beside myself that I didn't know this one before. A fellow business partner of mine named James Sutton mentioned this one to me. This one's been around since ASP.NET 2.0 as well. If you have an ASP.NET web application site, and you place a text file named "app_offline.htm" in the root of the site, all requests to that website will redirect to that app_offline.htm file. Basically, if you need to take an entire ASP.NET site offline, you can place some nice message in that file. Then, any new requests to a URL, any URL, in that website will redirect to that file allowing you to do maintenance to the site, upgrades, or whatever. It is not really a redirect though. ASP.NET essentially shuts down the site, unloads it from the server, and stops processing any requests to that site. That is, until you delete the app_offline.htm file - then things will continue as normal and your ASP.NET site will load up and start serving requests again. 

    A super-cool side effect of this is that any files that are locked by the site, such as a database or other resources, are freed since the application domain has been unloaded from the server. This allows you to remove the locks from those files and replace them, without the need to do a full IISRESET, taking down other sites on the server. One thing to keep in mind with this file however, make sure you out enough content in it so it is larger than 512 bytes or IE will consider it a 404 and will display the 404 instead of the contents of your app_offline.htm file.

    Thanks to Ryan Farley for posting this tip...

     

    Read more...

  • New Image Generator control in ASP.Net 3.5

    Storing images in database BLOB field and displaying it on aspx page is one of the common tasks we do in asp.net projects.  Asp.Net itself does not have an in build control to bind the image stored in database. To display an image stored in database, we will write an HttpHandler which will fetch the image from database and do a binary write. We all know that doing a binary write will become cumbersome when the number of images increases and the number of users becomes high. This week Microsoft have released a new control called ASP.NET Generated Image control to display image in ASP.Net page. This article will give you a kick start on this control and some of its features.

     Read more...

     

    Read more...

  • H.264 and AAC support coming to Silverlight

    Great news! But does it means Windows Media Services will be updated or we need to use only Windows Server 2008?

    At IBC 2008 we will be demonstrating a technology preview of H.264 video and Advanced Audio Coding (AAC) audio playback support in Silverlight, and H.264 authoring using Microsoft Expression Encoder and Windows Server 2008 for delivery. Until now, Silverlight has supported the SMPTE VC-1 and Windows Media formats, as well as MP3 for audio, enabling customers to take advantage of broad support across the Windows Media ecosystem, including third-party tools, service providers and content delivery networks.

    We’ve always wanted Silverlight to support a variety of formats, so today we’re announcing that H.264 and AAC support will be available in a future version of Silverlight, which will offer content owners greater flexibility and choice to deliver video and audio.”

    Scott Guthrie

    Via Tim Heuer's blog

     

    Read more...

  • ASP.NET AJAX Page Methods

    Simply put, a Page Method is a page specific WebMethod.  Instead of creating a full web service for your method, you can conveniently create a method in your page and use it from client-script.  Let's look at how simple it is to use them...

    Read more..

     

    Read more...

  • SQL Server 2008 - Merge Statement

    In this article Nidal Arabi examines the usage of a SQL Server 2008 feature named Merge statement. It is a new T-SQL Statement that allows you to perform join of tables and then apply one of three different operations on the result set. He demonstrates the concepts with the help of step-by-step explanations accompanied by relevant SQL statements.

    Read more...

     

    Read more...

  • Slider AJAX control in ASP.NET 2.0 and C#

    In this article Joe Maguire will explain how you can easily create an AJAX enabled web site within Visual Studio 2005 utilizing C# and how to utilize the AJAX framework to add a simple control from the list of controls available in the AJAX Control Toolkit.
    The AJAX control we will be working with in this article will be the “Slider” control. We will also learn that the Slider control can be manipulated via its properties to display horizontal or vertical as well as allowing you to have incremental steps or a smooth non-step motion.

    Read more...

     

    Read more...

  • Progressbar for long running scripts

    I have been looking, to no avail, for an easy way to show a progress bar in ASP.NET that can be updated with C# code-behind, so this one built by Wayne Redelinghuys might be useful to other developers who need to show the progress of a long running code snippet.

    Read more...

     

    Read more...

  • The .Net Coffee Break Show 5 - Ajax Data Binding with Dino Esposito

    Developers.ie invites all our members to attend our regular webcast.
     Dino Esposito
    Our next speaker is Dino Esposito, with a talk on AJAX Data Binding.
     
    Dino is the author of Programming ASP.NET 3.5 Core Reference (Microsoft Press, 2008) and other best-selling books such as Introducing ASP.NET AJAX (Microsoft Press, 2007) and Programming Microsoft ASP.NET 2.0 Applications-Advanced Topics (Microsoft Press, 2006). He's also the author of the "Cutting Edge" column on MSDN Magazine and a frequent speaker at industry events worldwide, including Microsoft TechEd, DevConnections and in Europe, DevWeek and Basta.

    ASP.NET AJAX excels at connecting client code with remote services, but it doesn't provide just as yet an as much excellent mechanism to consume downloaded data within the client browser.

    No doubts that this aspect of AJAX programming will be greatly improved in the near future; however, for the time being, ASP.NET AJAX doesn't offer a UI model as rich and well done as the server-side service model. In this webcast, dino will discuss client-side templates and data binding for an effective and JavaScript-powered consumption of server data.

    This will be broadcast live on Tuesday 9th of September at 11:00 (Irish time!)

    All the connection details to the show will be sent to you a few days prior to the start of the webcast.

    This event is free but you need to visit our new Webcasts section to register!

     

    Read more...

  • Google Chrome

    So not really a big surprise but Google launch a new browser today called Chrome.

    Now one question to my future self: When I am going to get some sleep?

    Not only I have to struggle with two main browsers and their different versions and different OS, now one more on the way?

    Crazy world. I might just drop dead one day, totally exhausted!

    Check here the live Chrome Press Conference. Seems to be only for PC at the moment.

    Download soon here

    Update: What puzzle me is  for me the first time I think Google going public on thier launch with a live conference. Not only that, but also put their developers in front of a camera instead of the usual Eric and Larry.
    Maybe something new in their PR approach?

    The demo is going well, but so far I am not totally impressed. Wait and see...

    Update 2: Well it didn't take long, just downloaded Chrome and installed, curious to have a go.

     

    Read more...

  • Silverlight - It's too damn complicated to setup :-(

    I start by saying I like XAML, and the whole idea of rich web application in my projects. However my recent experience with Silverlight has been tarnished by a lack of good implementation procedure by Microsoft.

    In one project, I wanted to convince my colleagues that Sileverlight is the coolest thing on earth, well not so fast!

    First the project: simple task, adding an audio player to a podcast page. Quite easy, in the past I will have to create a Windows Media Player
     object in the web page, plus eventually an 'embed' tag for Mozilla browsers.

    Done that before, wanted to do something more universal working with Apple browsers for example. Flash and Silverlight promise just that. I choosed Silverlight, and the recent version 2 (still in Beta).

    1st try, the ASP.Net Media Player control:

    Well work fine with Internet Explorer 6, and Firefox 2. However with Firefox 3 caramba!. I discovered quickly that the control use Silverlight but only 1.0 or 1.1 not 2.0.
    Worst, with Vista the play and pause buttons don
    t work at all. I tried everything no hope.

    2nd try, with Silverlight.js for the detection part

    It's really sad that the Media player control has not been updated by Microsoft in the recent 3.5 Service Pack 1. It's now really useless. I even changed the 'version' attribute to 2.0. Try it for a laugh! You will have the standard generic Silverlight logo asking you to download and install the version... 1.1 Alpha!

    So then I entered in a very depressive mood with the plug-in detection. With Flash, it has always been quite straightforward, an icon or a linked text, then you are sent to Adobe to download and install the plug in. You don
    t even have to restart your browser a refresh is enough.
    You have the FULL control on the implementation and you can make it clear for your users on the 'why I need this damn thing to open this video?'
    With Silverlight, nope. It's not for technophobes. Microsoft has decided they know more than you regarding the way to tell that you need to download something. They automatically put a big huge icon in your face without any explanation at all to tell your grandmother what the hell to do with this bluish Silverlight logo? Super.. what?

    I
    d loved to add my own touch, an help button, a new logo, no hope.

    Now look you have two solutions, sort of hacks really, and not really to use.

    The first one is to implement a Silverlight Javascript API (check here for more details). Whatever I did with this thing, I never passed the test with Firefox or IE 7. Look like it works only with Silverlight 1.0 or 1.1.

    3rd try, a Silverlight control

    Thanks to Tim Heuer, I found some interesting information on his blog, like this one regarding Firefox 3 issue with Silverlight 2, or this one regarding a way to detect Silverlight other than Javascript using a hack with the Object tag.

    Following Tim advice I downloaded the video player he developed in XAML. It's surely cool stuff but for some strange reasons I couldn't get the project working with my own stream. All the time the control bar disappeared after clicking on the play button.

    I managed to get it right with a few changes in the Xaml Media controls, basically by changing everything which look to stretch any media element.

    Now I say Microsoft has to hurry up if they want the web developers to adopt quickly Silverlight. They claim Silverlight 2 Beta is not officially compatible with Firefox 3 and we have to wait for the release version. Well sorry for them, but the Mozilla team is pushing hard their Firefox 2 users to upgrade quickly so it
    s really time to do something.

    The other matter is to get a much cleaner way to implement easily Silverlight 2 on an ASPX page. Why not doing something like the Listview, with a template part where we can put our own installation links?

    Finally,
     they have to make sure the Media player ASP.Net user control continue to be updated or maybe put it back to the Ajax Control Toolkit as an open source project, to be sure the community can improve it.

    I believe those issues need to be address in a very short timeframe, otherwise Silverlight success seems compromised, exception maybe for some niche applications.

    Read more...

  • The .Net Coffee Break Show 4 - ASP.NET Dynamic Data

     Developers.ie invites everyone to attend our regular webcast.

    Our next speaker is Joe Stagner, with a talk on ASP.NET Dynamic Data.
     
    Joe StagnerJoe is a Senior Program Manager in Microsoft Corporation’s Developer Tools and Platform Group and has been with Microsoft since 2001 focusing on highly scalable and performant web application architectures, multiplatform interoperability and software security. Joe brings 30 years technical and business strategy experience to Microsoft which affords him a unique experiential perspective.

    ASP.NET Dynamic Data is one of the quickest means to build functional data-driven web applications. It ships as an extension to ASP.NET and it can ‘dynamically’ display web pages and supports CRUD operations against a variety of data object models, without having to create pages manually.

     


    This will be broadcast live on Wednesday 3rd of September at 15:00 (Irish time!)

    All the connection details to the show will be sent to you a few days prior to the start of the webcast.

    This event is free but you need to visit our new Webcasts section to register!

     

    Read more...