Tuesday, November 20, 2007

Philly.Net's November meeting is a return to the "15 Minutes of Fame" format.  We had 10 speakers each providing a 15 minute presentation.  Sort of a geek sampler.  In addition to my duties as Swag Man (if you don't know, I gather all of the prizes), I'm doing a 15 minute presentation on LINQ. 

With 15 minutes, I'm not getting into too much detail.  Just a bunch of cool code sample to show what LINQ is capable of.  Mostly, LINQ to SQL.  If you are interested, here is the code sample solution.

If you want to learn more about LINQ, here are some site to check out:

Scott Guthrie's Blog:  http://weblogs.asp.net/scottgu/  (Of Course!)

Wes Dyer's Blog: http://blogs.msdn.com/wesdyer/  (this guy knows his stuff on LINQ!)

Check out this great video by Wes.  It explains a lot, it is definitely worth watching:  http://wm.microsoft.com/ms/msdn/visualcsharp/wes_dyer_2007_01/WesDyer_0002.wmv

Tuesday, November 20, 2007 5:53:31 PM (Eastern Standard Time, UTC-05:00)  #    Disclaimer  |  Comments [0]  |  Trackback

Philly.Net's November meeting is a return to the "15 Minutes of Fame" format.  We had 10 speakers each providing a 15 minute presentation.  Sort of a geek sampler.  In addition to my duties as Swag Man (if you don't know, I gather all of the prizes), I'm doing a 15 minute presentation on LINQ. 

With 15 minutes, I'm not getting into too much detail.  Just a bunch of cool code sample to show what LINQ is capable of.  Mostly, LINQ to SQL.  If you are interested, here is the code sample solution.

If you want to learn more about LINQ, here are some site to check out:

Scott Guthrie's Blog:  http://weblogs.asp.net/scottgu/  (Of Course!)

Wes Dyer's Blog: http://blogs.msdn.com/wesdyer/  (this guy knows his stuff on LINQ!)

Check out this great video by Wes.  It explains a lot, it is definitely worth watching:  http://wm.microsoft.com/ms/msdn/visualcsharp/wes_dyer_2007_01/WesDyer_0002.wmv

LINQDemo.zip (94.67 KB)
Tuesday, November 20, 2007 5:50:50 PM (Eastern Standard Time, UTC-05:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Thursday, November 15, 2007

I learned something new today, thought I'd share it.  Actually, I think I relearned it, it sounded familiar.  There are so many features to .Net these days it is tough to remember everything.  Anyway, here we go.

Did you know that you can put content directly inside a ContentPlaceHolder of a MasterPage?  I'm not talking about in a page's asp:Content control that matches up to the Master's asp:ContentPlaceHolder.  That is what we typically do.  But you can put content in the asp:ContentPlaceHolder control on the master.  I like to think of it as default content.  In the content page, if you put content inside the asp:Content control, it will override the "default" value from the Master.  If not, the Master's content will be shown.  Content, Content Pages, asp:Content, asp:ContentPlaceholders...confused?  Here's a simple example:

Here is some code from body of our MasterPage.  I'm only including the body to save space.  We have 2 contentplaceholders.  The first has some "default text"

<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
            By Default, show this.
        </asp:ContentPlaceHolder>
    </div>
    <div>
        <asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
        </asp:ContentPlaceHolder>
    </div>
    </form>
</body>

Now let's look at our first ContentPage.  It puts text in each of the Content areas:

<%@ Page Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" 
CodeBehind="WebForm1.aspx.cs" Inherits="MasterPageSample.WebForm1" 
Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    content in placeholder 1
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    content in placeholder 2
</asp:Content>

Next comes our second ContentPage.  This one only has one asp:Content control to match the second ContentPlaceHolder from the MasterPage:

<%@ Page Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" 
CodeBehind="WebForm2.aspx.cs" Inherits="MasterPageSample.WebForm2" 
Title="Untitled Page" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    content in placeholder 2
</asp:Content>

The last ContentPage has 2 asp:Content controls but only the second one has actual content. The first one is empty:

<%@ Page Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" 
CodeBehind="WebForm3.aspx.cs" Inherits="MasterPageSample.WebForm3" 
Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    content in placeholder 2
</asp:Content>

So what are the results?  The first page renders both pieces of content:

image

The second one shows it's content and since the first ContentPlaceholder wasn't matched up with a Content control, it shows the content from the MasterPage:

image

The last page has both ContentPlaceHolders matched up, only the first has no content at all.  So in this case, it overrides the "default" content from the master with nothing!  All you get is the content from the second Content control:

image

Pretty cool, huh?

Thursday, November 15, 2007 8:51:40 PM (Eastern Standard Time, UTC-05:00)  #    Disclaimer  |  Comments [4]  |  Trackback
 Tuesday, November 06, 2007

We've got lots of stuff going on with Philly.Net these days.  Here is some news that I thought would be worthwhile.

Next Meeting:  "15 Minutes of Fame" on November 20, 2007 - Instead of having only two speakers, we'll have 10 speakers, each doing about 15 minutes!  We did this last year for our Nov. meeting and we got great feedback so we'll try it again.  I'm looking forward to it, I'll be doing my 15 minutes on LINQ.  For more information, check out the web site

Visual Studio 2008 is Coming Soon - This isn't exactly Philly.Net news but I thought it was worth mentioning.  Check out the Visual Studio Developer Center for the details.  Microsoft announced at TechEd in Barcelona that VS 2008 and .Net Framework will be released this month!

Future Meetings - We've got lots of good stuff coming soon including regular meetings, Code Camps, Pub Nights and some special events.  If you are interested in speaking or sponsoring, please let us know.  We need sponsors and speakers starting with January Code Camp and also the February monthly meeting.  If you have never spoken, I advise you to give it a try.  It is fun and you'll actually learn a lot from the process.

Architects Group - Mitch Ruebush is starting up a User Group for Architects.  Keep an eye out for more information.

We've got some other things that we're working on.  Plans for Code Camp, newsletters and more.  You'll be hearing more about that soon. 

Tuesday, November 06, 2007 8:49:14 PM (Eastern Standard Time, UTC-05:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Thursday, October 25, 2007

I haven't mentioned this recently, there is a NoDeNUG meeting tonight.  As one of the founders, I'm supposed to help promote the group but for some reason I forgot to mention this meeting on my blog.  What makes that even stranger is that I am the presenter tonight!  So if you are in the area, come out tonight to learn about Creating Custom Server Controls.  It's free, and we'll have pizza.

If you want to know more about these meetings, don't rely on my blogging them.  Go to NoDeNUG.org and sign up.  There's no obligation of any kind and you'll get our monthly meeting reminders via email.

Thursday, October 25, 2007 6:05:48 AM (Eastern Standard Time, UTC-05:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Sunday, October 21, 2007

Some time ago my wife and I found out that our baby, due in Feb, will be a boy!  It's really sinking in that this baby is coming.  As weird as that sounds, my friends with kids say they felt the same way.  I guess it is harder for men, since we aren't actually pregnant.  Now the responsibility of being a parent is starting to kick in. 

As if it isn't bad enough that this poor guy is going to inherit my genes, I now face my first real situation to screw this kid up - picking a name for him.  This is a tough choice for many reasons but my wife and I are discussing a few options.  We've chosen to keep the name a secret.  That's partly because the surprise will be fun, and partly because it shields us from a lot of criticism and suggestions.  If we tell people we're gonna call him "X" people will tell us what they think, good or bad.  But if wait and announce it after he is born, people can't really criticize us, it is too late!

My second dilemma is pretty serious too.  As I write this post, I am watching the NY Giants game.  Yes, I am a fan of the NY Giants, living in the Philadelphia suburbs.  I grew up in central NJ and have always been a big Giants fan.  My wife and her family are, of course, Eagles fans.  So this is a big situation.  Which team in this classic NFL rivalry will my child support?  Well, I am sorry to do this to him, but I plan to encourage him to back the Giants.  I'll try not to share my "anti-Eagles" attitude with him.  So when the Eagles are playing, I'll encourage him to cheer them on (I don't want him to get picked on too much!) but when they are playing NY, I hope he'll side with his old dad and cheer on the Giants.  Of course, he'll eventually make his own decisions so who knows what will happen.

Sunday, October 21, 2007 2:03:17 PM (Eastern Standard Time, UTC-05:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Wednesday, October 17, 2007

 

Tonight's meeting was sponsored by RDA Corporation.  They provided our dinner (pizza) as well as a $50 Gift Card to Circuit City as a give away!  Making it's first appearance at a Philly.Net meeting was our new coffee maker!  We bought it for Code Camp but now we'll have coffee for our regular meetings.  Enjoy it!  Thanks to Rob for running tonight's meeting.  Bill was out at Microsoft in Redmond (supposedly he's working) so Rob stepped up to run the show and make announcements.

Our next meeting is November 20th.  We are bringing back the "15 minutes of Fame" format that we used last November.  That means we'll have about 9 presenters, each doing a brief 15 minute presentation.  Last year this worked out really well and we got a great response.  If you are interested, please contact Bill or myself. 

UPDATE:  Both of the presenters are from RDA Corporation.  Check out their Technology Corner for information on these presentations and more.  Or click directly to Building an Extranet with Forms-Based Authentication using WSS 3.0/MOSS 2007 or Visual Studio 2005 Tips and Treats

Presenter:  Deepak Gupta, RDA Corporation
Topic:  Building an Extranet with Forms-Based Authentication using WSS 3.0/MOSS 2007

Sorry, I can't summarize this session.  I was busy with Philly.Net business and I missed the whole thing.  It's too bad because I was told that Deepak really knows his stuff on Sharepoint!

Presenter:  Steve Andrews, RDA Corporation
Topic:  Visual Studio 2005 Tips and Treats

Steve started by promising that these tips would be posted here on his blog.  It's a good thing too because he jumped right in with a ton of tips and I can't remember them all.  He started by showed how to customize VS menus and toolbars with a variety of features that aren't there by default.  Then he showed all kinds of shortcuts and settings that I plan on using tomorrow at work.  I've been using Visual Studio since 2002 and I didn't know many of these little tidbits.  The crowd contributed a few tips too and I'm certain that everyone learned something tonight.  As a bonus, Steve did a quick demo of Lutz Roeder's awesome Reflector tool.

We wrapped up with prizes from RDA, O'Reilly, Wrox, Sams, and SourceGear!

Wednesday, October 17, 2007 7:20:14 PM (Eastern Standard Time, UTC-05:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Tuesday, October 16, 2007

Last night I presented at the Lehigh Valley .Net User Group.  We had a small turnout but it was a good, interactive group.  I'm definitely looking forward to going back there to present again, if they'll have me!  One thing I found out - it is not as far as I thought.  It took about an hour to get there.  That is a little far to drive for a user group meeting but if there is a topic that you really want to learn, it would be worth it.  I'd advise the Lehigh members and the Philly.Net members to keep an eye on each other's schedules.  Of course, for a full day event like a Code Camp, it is definitely worth the drive to come from Lehigh down to Malvern (where Philly.Net hosts Code Camp).

Anyway, in case you forgot, here is where you can get the source code for the presentation.  Even though I used VS2008 for the demo, the zip file contains a VS2005 solution.

Also, here is where you can get some more explanation on the CreateChildControls() vs Render() situation discussed last night.

Once again, thanks to the guys who came out last night.  Hope to see you again soon.

Tuesday, October 16, 2007 6:21:57 AM (Eastern Standard Time, UTC-05:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, October 08, 2007

Today I am in Boston at the ReMix07 conference.  A team of us from Philly.Net came up together in Bill's van.  It was a pretty comfortable ride and things went pretty well.  Although there was one point where Mark M directed us into a wrong turn in North Jersey.  We ended up in a field where Tony Soprano buries his bodies.  Anyway, we made it to Boston in the end.

This morning started with a keynote by Brad Abrams, Group Program Manager for the .Net Framework.  He showed off some cool examples of Silverlight.  One example I liked was a streaming video application for HSN.  You can watch (I don't usually watch HSN, seriously) the HSN live in the browser.  The cool part is that the video stream is data encoded, so if you click on a "purchase" button within the Silverlight media player it let's you purchase the item that happens to be showing in the video at that moment.  It's a cool idea.  We saw some other samples too.  Tafiti is a cool Silverlight based search engine.  It has some interesting features and is worth checking out.  Also, check out http://silverlight.live.com/ for a free place to host your Silverlight projects.

The Keynote included a really cool demo.  It was very simple but it got the point across.  Brad created a little Silverlight 1.1 application with some animated XAML that has a click event.  The event is handled by .Net code running in the browser (yes, client side).  He of course created this with VS2008 running in Windows.  But then he FTP'd it up to a Linux server.  And then he pulled it down into a browser running on a Mac.  Yes, it seems that this stuff really runs on various platforms in various browsers.  Lastly, he used the Visual Studio debugger to attach to the Mac's browser and stepped into the code running client side on the Mac!  How cool is that?

Today I sat in on presentations by Rocky Lhotka, Jeff Prosise, and Fritz Onion.  Not bad for one day.  Jeff's talk on Silverlight 1.1 was great and had much more detail then the keynote's Silverlight 1.1 samples.  Silverlight on the client runs 300-400 times faster then Javascript!  The Core CLR that will run on in the browser has a lot of functionality including LINQ, RegEx, Reflection, Generics and Threading!  Some stuff was stripped out to make the download small enough, including COM Interop, Remoting, Binary Serialization.  Most of that is stuff that shouldn't be running in the browser anyway.  Jeff talked about the Transparent Model for security, all code is "sandboxed" to run safely. 

A few other things to mention:

1.  All of the presentations I saw today used C# as the .Net language!  Eat that VB.Net guys!  C# rules.

2.  Lindsay is awesome.  I promised I'd say that.

3.  I don't have the photos yet but at dinner last night Mark M got into an argument with the waitress.  She the proceeded to scold him and force him to put on a dress, become a waitress, and take the order from the next table!  It was classic.

Monday, October 08, 2007 4:30:24 PM (Eastern Standard Time, UTC-05:00)  #    Disclaimer  |  Comments [0]  |  Trackback