All posts by Julie

Current Presentation Submissions for Vermont Code Camp 2

Vermont Code Camp 2 is Saturday Sept 11, 2010 in Burlington, Vermont.

We will be taking submissions for presentations through Sunday August 23rd.

Below is a list of the current abstracts submitted for the event.

We can fit more talks in during the day since we have 4 rooms so if you want to submit go to http://vtcodecamp.eventbrite.com.

Last year (our first) we had 85 attendees and expect even more this year. We’ve got lots of sponsors providing breakfast, lunch, books, software license and more!

Visit www.vtdotnet.org/codecamp for more info or go right to http://vtcodecamp.eventbrite.com to register as an attendee and/or submit your own session ideas!

_________________________________________________________________________________________________

Lambdas in C# and VB.NET using Visual Studio 2010
They can be used everywhere a delegate is needed, they’re handy and very sexy… They’re lambdas and if you already know what lambdas are then let me show you a few things you can do with them! Join me for a short introduction to the concept of lambdas and then explore spicy lambda examples that will show you more on their potential!

Get a handle on your build process
The choice of tools and processes surrounding your application deployment process can have major impacts on development time, deployment speed, and disaster recovery. This session will focus on dealer.com’s migration to Git, Maven, Hudson, and a new branching strategy for consistent, repeatable, speedy builds.

Silverlight and you – The best relationship you’ve ever had
With the release of Silverlight 4 more and more developers are looking to develop in Silverlight, especially with the introduction of Windows Phone 7. In this presentation anyone starting out, or even currently developing with Silverlight, will learn important information regarding this development platform, as well as look into how to create data-driven applications with Silverlight.

Building Cloud-Native Applications with Windows Azure
Cloud computing is here to stay, and it is never too soon to begin understanding the impact it will have on application architecture. In this talk we will discuss the two most significant architectural mind-shifts, discussing the key patterns changes generally and seeing how these new cloud patterns map naturally into specific programming practices in Windows Azure. Specifically this relates to (a) Azure Roles and Queues and how to combine them using cloud-friendly design patterns, and (b) the combination of relational data and non-relational data, how to decide among them, and how to combine them. The goal is for mere mortals to build highly reliable applications that scale economically. The concepts discussed in this talk are relevant for developers and architects building systems for the cloud today, or who want to be prepared to move to the cloud in the future.

Demystifying Cloud Computing and Windows Azure
Introducing the key concepts around Cloud Computing, including specifics around Microsoft’s Windows Azure cloud platform. The goal is to demystify the cloud by answering questions such as the following:- What is Cloud Computing? – Why should I care about it? – How do I take advantage of the cloud?

Android and WCF Services
So the sales manager walks into your office with his bright shiny Droid 2 and sayshis golf buddy showed him an app on his smarthphone accessing his company’s salesdashboard and wants you to do the same thing. Only problem is his buddy’s phone is an iPhone! Are you hosed? Not at all. Android has great support for consuming WCF services whether via DTO’s, RESTful, or OData. You can use a third-party library toserialize/deserialize data that’s almost as easy as Visual Studio’s "Add ServiceReference" or for maximum control and flexibility you can parse out the XML or JSONyourself. In this talk I’ll show you how to build an Android app that talks to WCF services for a hypothetical sales manager’s dashboard.

Introduction To Android Development
Interested in mobile development but don’t want to buy a Mac and don’t want to wait until Windows Phone 7 ships? Then you should take a look at Google Android.With over 160,000 device activations per day and dozens of devices from everycarrier Google Android is the fastest growing smartphone segment. And it’s very easy to get started. In fact, if you know C# or Java and have experience withXAML you already know more about Android development than you think. In this talk you’ll get an introduction to the tools necessary to get started and demonstrations of simple Android applications.

An Introduction to Redis
Redis is an extremely fast, full-featured key-value store. It makes an excellent complement to traditional SQL storage solutions for operations that require greater load tolerance or more speed.This session will cover installation and setup, basic and more advanced commands, and several real-world examples of Redis being used in production.

Project "Dallas" – Data for the Cloud
Project "Dallas" is Microsoft’s Data-as-a-Service offering, providing a common, and low-friction approach to a growing number of data sets from the Associated Press, NASA, the UN, and elsewhere. Use of the OpenData (or OData) specification enables applications written in practically any language to create mash-ups limited only by your imagination. Implemented on Microsoft’s Windows Azure platform, project "Dallas" also serves as a real-world use case of cloud computing.

Windows Phone Development with Silverlight
Microsoft’s upcoming entry into the new-generation smart-phone market features Silverlight as the platform for application development. This presentation will go over the fundamentals of using Silverlight to develop rich, interactive applications for this emerging platform.

Creating Business Applications with Silverlight 4
Silverlight’s ability to translate existing .Net development skills to the development of Rich Internet Applications makes it a powerful tool for developing cross-browser, cross-platform Line of Business Applications. This presentation will focus on using Silverlight and related technologies to access, present, and manipulate distributed business data.

MS Business Intelligence Fundamentals: Developing OLAP Cubes in SSAS 2008 R2
This session focuses on the OLAP functionality of SQL Server Analysis Services 2008 R2, exploring the process of developing basic SSAS cubes and dimensions. You will learn how to extend the Unified Dimensional Model (UDM) with KPIs, actions, translations, and perspectives. And finely process and deploy SSAS database and objects into MS SQL Server 2008. We will learn how to: • Create Data Sources and Data Source Views • Create and Modifying SSAS Cubes • Create and Modifying Dimensions • Create Measure Groups and Measures • Create KPIs, Actions, Translations, and Perspectives • Process and Deploy SSAS Databases and Objects

What’s New in the .NET Framework & Languages  (abstract coming)

Visual Studio Tips and Tricks (abstract coming)

Managed Extensibility Framework (MEF) (abstract coming)

Like LINQ and lambdas? You’ll love F#! 
If you’ve already spent time wrapping your head around the use of lambdas in LINQ, find out how to use that knowledge to make the full leap into functional languages and reap the rewards functional languages have to offer you. This stuff is Zen, dude!

Sampson on Sunset Rock

This past week, my niece came to visit from Massachusetts and I had a mini-vacation. One of the many activities we did was take a hike and because it was cool-ish, we brought Sampson along. Here we are high up in the Green Mountains enjoying views of the Adirondacks. Mr. Muddy-Paws had found a nice cool pool of mud on the way up. Sampson has been with us for just over a year now. He’s 2 1/2 years old and turning into a wonderful dog.

sampson hiking with bonnie July 2010

Upcoming Entity Framework Events

I’ve started working on my fall calendar…here’s what’s going on so far.

 

Cleveland, Ohio, August (okay not quite fall…)

Tuesday August 10: Cleveland .NET SIG (INETA User Group Event) http://www.bennettadelson.com/netsig.aspx

 

Vermont, September

Saturday Sept 11: Vermont Code Camp 2!  www.vtdotnet.org/codecamp

 

NYC, September

Monday, Sept 27: Entity Framework Full Day Firestarter, Microsoft Offices, Free. Details & Registration forthcoming…

 

London, England, October

Thursday Oct 21: I am leaving this day open and would love to do a full day of EF mentoring with *your* company’s dev team. Contact me!

Friday Oct 22: Full Day Hard Core EF 4 Workshop. Probably around £300-£400 for the day. Details & Registration forthcoming…

Saturday Oct 23: Full Day, multi-speaker event at Microsoft including something on intro EF4 by moi. Free! Details & Registration forthcoming…

 

The Netherlands, October

Mon&Tue, Oct 25 & 26: SDN Conference http://www.sdn.nl/SDN/SDNEvent/SDNConference2010/tabid/162/Default.aspx

 

Las Vegas, November

Mon-Thurs, Nov 1-4: DevConnections  http://devconnections.com/

Vermont IT Jobs: RFP for 3-6 month project, C# Programmer w/NHibernate exp

Request for Proposal
Application Development Support
7/19/2010

The Vermont Energy Investment Corporation (VEIC), a non-profit corporation, requests
proposals for application development support to be completed and presented to VEIC by
7/26/2010.

Electronic submissions of the proposals are welcome and encouraged. Please send those to
jfishelman@veic.org. Written proposals and resumes (including attachments) should be no
longer than 4 pages.

Vermont Energy Investment Corporation
Vermont Energy Investment Corporation (VEIC) was founded in 1986 and is a non-profit
corporation that provides energy conservation and renewable energy programs and projects,
nationally and internationally. VEIC includes one division that administers the Efficiency
Vermont (EVT) contract with the state of Vermont. This program is funded by electric
ratepayers in the form of a surcharge on their electric bills. VEIC also has a separate division
that provides consulting, program development, evaluation, viability analyses, and other expert
technical services nationally. VEIC employs over 180 employees in four states, the majority of
whom are in Vermont. Further information about VEIC can be found on our website:
http://veic.org.

Scope of work
VEIC requires the assistance of an experienced C# programmer to assist us in the development
of our central line of business application(s). This work requires a high degree of proficiency in
object-oriented programming using industry standard best practices including test driven
development. Candidates with experience with NHibernate and dependency injection
frameworks preferred.

Work is expected to last between 3 and 6 months.

The selected candidate will work as part of our application development team and under the
direct supervision of our Lead Software Engineer.

Responses
Responses should include the credentials and experience of the persons who would be
designated to conduct the required services.
References
Please supply at least three (3) references who have used your professional services for a
similar project. Include a contact name, address, and a contact phone number.

VEIC will conduct follow up interviews with the person(s) who would be providing the
required services to further discuss experience and expertise.
Proposal selection will be qualifications-based. VEIC will intend to negotiate contract terms
with the most qualified vendor. If unsuccessful, VEIC would intend to then negotiate with the
next most qualified vendor, until reaching satisfactory contractual arrangements. VEIC
reserves the right to not award a contract should none of the proposals adequately address the
requirements outlined in the RFP.

Proposals will be evaluated on the following criteria:
1. Demonstrated experience and expertise in similar projects (80 points)
2. Strength of references (20 points)
Questions regarding this RFP should be direct to: Jules Fishelman, IT Manager, 802-658-6060 x1029

Descriptions of 1st and 2nd Edition of Programming Entity Framework

I’m waiting for the O’Reilly site, Amazon and elsewhere to update the descriptions of the two different editions of my book. Since not everyone is lucky enough to move to VS2010 and EF4, both editions will be on the market. Right now they both have the same description online which is wrong. I don’t want anyone to get the wrong edition and then be misled.

Here are rough drafts of what the updated descriptions will look like:

1st edition (for EFv1 and VS2008/.NET 3.5SP1)

Programming Entity Framework is a thorough introduction to Microsoft’s core framework for modeling and interacting with data in .NET applications. This highly-acclaimed book not only gives experienced developers a hands-on tour of the Entity Framework in Visual Studio 2008 and .NET 3.5, explaining its use in a variety of applications, it also provides a deep understanding of its architecture and APIs. While many of the lessons from this first edition will continue to be valuable as you move to .NET 4.0, the second edition (link???) of Programming Entity Framework targets Visual Studio 2010 and .NET 4.0 where there have been many advancements and additions to the framework. From the Entity Data Model (EDM) and Object Services to EntityClient and the Metadata Workspace, this book covers it all.

 

2nd Edition (for EF4 and VS2010/.NET 4)

Programming Entity Framework, 2nd Edition is a thorough introduction to Microsoft’s core framework for modeling and interacting with data in .NET applications. On the heels of the highly-acclaimed first edition, this book not only gives experienced developers a hands-on tour of the Entity Framework in Visual Studio 2010 and .NET 4.0, explaining its use in a variety of applications, it also provides a deep understanding of its architecture and APIs. You’ll find hundreds of examples and numerous sample applications that take advantage of the new features in Entity Framework 4.0.  Whether you are building Rapid Application Development software or highly architected applications that are testable and provide a separation of concerns,  you’ll find hundreds of examples and numerous sample applications to help you achieve your goals. The book is filled with insight into the inner workings of the Entity Framework to help you become an Entity Framework expert. From the Entity Data Model (EDM) and Object Services, from WPF to ASP.NET MVC, from drag and drop to domain-centric applications, this book covers it all.

Both books are roughly the same length (app 800 page).

The *list* price for both editions is 54.99.

You can pre-order the 2nd edition at OReilly for $39.99 (http://oreilly.com/catalog/9780596807252) and on Amazon for $37.79 (http://learnentityframework.com)

O’Reilly tells me we’re on track for August 15th release. Amazon says August 26th but that’s probably when they expect to have the books in their warehouse to be able to ship.

Code First – It’s not Entity Framework Programming , it’s Just Programming

This is what I’ve realized about using the latest iteration of EF4’s Code First in the EF Feature Pack CTP. (I will keep clarifying that code first and the new EF bits in the CTP are a preview, not for production and subject to change…)

When using code first where you simply create your domain classes and define a DbContext to manage them, Entity Framework quietly slips into the background and does all of it’s work – transforming LINQ queries into store queries, executing them on your behalf, reshaping the query results into your classes, change tracking and then handling persistence to the database.

Between code first’s behind-the-scenes automatic model creation and some of the small but impactful additions to the core API (e.g., DbSet and DbContext), when creating simple applications, you will no longer have to be focused on how to design an Entity Data Model or write Entity Framework code, because most of that will be taken care of you by these new features. Calling context.Customers.Add(myCustomer) doesn’t feel too much different than working with any other collection in .NET. Compare that to context.Customer.AddObject(myCustomer) which your .NET brain fights (just ask Chris Sells :)). Or context.Customers.Remove(myCustomer) which correctly implies that you are removing something from a collection vs. context.Customers.DeleteObject(myCustomer) which is unnatural, but worse, incorrectly suggests that you might be actually deleting this from the database.

While this does feel like an epiphany (oh, it’s just programming) and people like Scott Hanselman are calling code first “the magic EF unicorn”, keep in mind that as you start architecting more complex applications, you’ll still have a lot to understand about the behavior of EF and how to work with it. So, no, I’m not calling “stop the presses” on my book.

Code First will not be for everyone. Many people want and need to build their model by reverse engineering an existing database. Many people like using a modeling tool. That’s why EF has these options and that’s what drove the alignment of the names:

  • Database First
  • Model First
  • Code First

Use what works for you…

How Vermont Code Camp is using EventBrite for Abstract Submission

The Vermont.NET User Group has been using EventBrite.com for monthly meeting registration for the past year. It makes things so easy so that we can know how much pizza to order and also we print out tickets to use for the swag raffle at the end of the meeting.

But for the upcoming Vermont Code Camp (Sept 11, 2010) we also needed to collect abstracts.

After poking around the EventBrite site, I discovered that you can create customized questions in addition to the typical name & address collection. And then I saw that you can tie those questions to a particular ticket.

So I created an attendee ticket and a Speaker Session proposal ticket:

 

image

Then in the event management page, there is a link to “Collect Customer Information”

image 

The customization form is very clever. I can have questions with answers that are short or long text boxes, option buttons, checkboxes or drop downs and I can define how many choices and what the choices are for those various options. You can add a number of questions. I don’t know what the limit is. I only had 4.

image

There was a place that allowed me to specify which ticket to tie the form to.

Now when someone registers for that second ticket type, they get this form to fill out:

image

Regular attendees see this registration form:

image

So now we can collect the abstracts and use EventBrite’s management tools to manage those abstracts, including exporting the data for additional tasks as we get closer to the event.

Thanks EventBrite!

What I’m loving about the newest iteration of EF Code First in CTP4

There have been a lot of improvements to code first since CTP3 and in fact, the team has been experimenting with changes to the core Entity Framework APIs that not only support even simpler programming with code first but that we’ll benefit from in an upcoming release of .NET. (No, I don’t know if there will be a service pack and when…)

I have a code first sample in my book, Programming Entity Framework 2nd Edition, that is coming out in August and was lucky with the timing of the CTP4 release because I was able to sneak in an overhaul of that section before the book heads to the printer.

In revising my code sample for that section I was very happy with so many of the API & Code First improvements.

**But first a clarification is important. The version of Entity Framework that is in .NET 4/VS2010 is the current shipping, supported version that you can use in production. What’s in the CTP is simply an early look at what’s coming as it evolves giving us a chance to play with it. This is not something you can deploy and it is also going to evolve with future CTP versions.**

So with that in mind, I went to town on the CTP3 sample.

The first thing that I benefited from was the new stripped down easy access versions of the ObjectContext and ObjectSet.

The new classes, DbContext and DbSet have the same essential functions but don’t expose you to the entire feature set of their big brother & sister. Not everyone needs all of those features. The are not derived from ObjectContext and ObjectSet however, but provide easy access to the full featured versions through a property e.g., DbContext.ObjectContext and DbSet.ObjectSet.

Along with this simplification are simplified terms.

Where ObjectSet has AddObject

context.Customers.AddObject(myCust) – note that Customers in this case is the ObjectSet)

DbSet simply uses Add

context.Customers.Add(MyCust) –>now I’m using Customers as a DbSet).

Another nice trick is how DbSets are created.

ObjectSet has an internal constructor and does not have a parameterless constructor,so you need a backing variable

ObjectSet<Customer> Customers;

and then you need to execute the CreateObjectSet method to create the ObjectSet:

context.CreateObjectSet<Customer>(“Customers”)

DbSet has a constructor so you can use an auto-implemented property

public DbSet<Customer> Customers { get; set; }

Code First gets way easier

It’s true. I cut out gobs of code and moved code to where it belongs.

Code first uses convention over configuration. It looks at your classes and does its best job of inferring a model and a database schema from it (if you are starting from scratch). Your classes don’t always provide enough metadata so you can provide more info to code first through additional configurations. Initially those configurations were programmatic only but now you can also use attributes in your classes (“data annotations”).

Here are two examples.

In my model I have a class called ConferenceTrack. It has an identity property called TrackId. Code first convention looks for “Id” or class name + “Id” as an identity but TrackId doesn’t fit this pattern so I have to tell EF that this is my identity key.

I can do that using code first’s ModelBuilder (formerly called ContextBuilder):

modelBuilder.Entity<ConferenceTrack>().HasKey(ct => ct.TrackId);

In CTP3, I had to execute from the same code that instantiates the context. Bad bad. Now there is an OnModelCreating method that I can use and put that configuration inside that method. The method lives in the context class. I don’t have to call it. The context is smart enough to run it for me.

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
   modelBuilder.Entity<ConferenceTrack>().HasKey(ct => ct.TrackId);
}

Alternatively, I can configure this key right in my class as an attribute of the TrackId property.

    [Key]
    public int TrackId { get; set; }

Definitely simpler. I prefer to keep all of that EF related stuff in the context class so will most likely continue to use the fluent configuration rather than the data annotations.

Boy oh Boy did Relationships Get Easier

In my domain classes, I have a bunch of relationships defined through properties.

E.g.

ConferenceTrack has

public ICollection<Session> Sessions  { get; set; }   (a one-to-many relationship)

Session has

  public ConferenceTrack ConferenceTrack { get; set; }  (a many to one relationship)
  public ICollection<Speaker> Speakers { get; set; } (a many to many relationship)

In CTP3 I had a whole bunch of configurations defined (that were hard to construct and hard to read) so that the model would understand my intent with these relationships. CTP4 is now smart enough to grok my intent based on the domain class properties. And if there’s something that I want that doesn’t follow the convention, then I can add a configuration.

So I removed *all* of the configuration code that described the relationships.

That made me happy.

And EF/Code First figured it all out.

Based on my classes and the single configuration to define the TrackId as the key for conferences, it created this database to persist my data into

ctp4

It worked out all of the relationships. Notice the Sessions_Speakers that it created for the many to many relationship.

Also, I have a class in my domain that is called Workshop and inherits from Session. By default Code First assumes Table Per Hierarchy. It created a discriminator column in the Sessions table which I need to use another configuration for to change its name to IsWorkshop.

There’s more to love about this CTP. You can get coding details from theEntity Framework Design and EF team blog’s newest posts and download the CTP here.

 As I’m learning more about domain driven development and as code first evolves, I’m getting more excited about this upcoming feature of Entity Framework

Creating Models from Databases with Billions of Tables

By now you know I’m prone to exaggeration so that “billions” thing is a stretch, but you get the point hopefully.

Lots of legacy databases have hundreds or even more tables in them.

People building Entity Data Models by reverse engineering a database often bring every table and view from the database into a single model.

Here’s an untouched model built from all of the tables and view of the AdventureWorks database – totalling about 95 entities.

awmodelbig

This is already unmanageable and causes design time performance issues, and it’s not even 100 entities.

I get questions all of the time from developers asking what to do  with large models.

Here is a recent question I got via email":

“I have a database with 150+ tables. Would you break the model up into multiple edmx files?”

My response (with some enhancements for the sake of this blog post):

Yes I would. I have lots of clients working with multiple models. One approach is to think of a model per transaction. E.g., if you have a data entry screen that only needs 6 entities, build a model for that. (That may be exaggerated).

Take a look at:

http://www.ideablade.com/WardsCorner/WardsCorner_home.aspx  scroll down to his large model discussion & demo. Ward and I have come up with the same conclusion. Ward has written something like a dissertation as he goes through the pros & cons of various approaches to the problem.

Also, another approach to consider (with or without breaking up the model) is a different designer that doesn’t try to visualize all of the entities (which makes things so cumbersome with the EDMX designer). LLBLGen Pro is already a great ORM in its own right. But they’ve taken their knowledge and built a deisgner specifically for EF4 with the goal of dealing with larger models.

http://weblogs.asp.net/fbouma/archive/2010/04/28/llblgen-pro-v3-0-with-entity-framework-v4-0-12m-video.aspx

Finally, just as an FYI, I’m guest editing an upcoming issue of DevPro Connections magazine and specifically asked Patrik Lowendahl to write an article on this very topic.

Windows Azure SDK Update 1.2: .NET 4 Support & more

In case you missed it (and are interested) there is an update (came in June) for Windows Azure dev tools. It’s version 1.2 and is supported in VS2008 & VS2010.

(http://www.microsoft.com/downloads/details.aspx?FamilyID=2274a0a8-5d37-4eac-b50a-e197dc340f6f&displaylang=en)

Most important to me is the .NET 4.0 support: now I can use EF4 in Azure services.

Windows Azure Tools for Microsoft Visual Studio 1.2 (June 2010)

Windows Azure Tools for Microsoft Visual Studio extend Visual Studio 2010 and Visual Studio 2008 to enable the creation, configuration, building, debugging, running, packaging and deployment of scalable web applications and services on Windows Azure.
New for version 1.2:

  • Visual Studio 2010 RTM Support: Full support for Visual Studio 2010 RTM.
  • .NET 4 support: Choose to build services targeting either the .NET 3.5 or .NET 4 framework.
  • Cloud storage explorer: Displays a read-only view of Windows Azure tables and blob containers through Server Explorer.
  • Integrated deployment: Deploy services directly from Visual Studio by selecting ‘Publish’ from Solution Explorer.
  • Service monitoring: Keep track of the state of your services through the ‘compute’ node in Server Explorer.
  • IntelliTrace support for services running in the cloud: Adds support for debugging services in the cloud by using the Visual Studio 2010 IntelliTrace feature. This is enabled by using the deployment feature, and logs are retrieved through Server Explorer.

As a test, I just built a new WCF Service Role (verifying that it is, indeed, a .NET 4 project), added a EDM to it (it’s not architecture, it’s a proof of concept) and pointed my EDM to one of my SQL Azure databases. I created a simple service operation to return data via the EDM. Then I created a client app which retrieved the data through that service operation. Easy-peasie.

azuretest