Officially Working for Pragmatic Works

Today is my first day meeting the team and getting a handle on everything Pragmatic does. My new role will focus on product development for all of Pragmatic's commercial software, and I looking forward to working with the team. I have always admired Brian Knight's ability to start something small and grow it into something big, and now I look forward to being a part of helping that something grow!

Currently rated 3.0 by 10 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: BayerWhite
Posted on: 8/17/2011 at 5:01 AM
Categories: General
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Jacksonville, Fl. CodeCamp - Approving Sessions

I have already started approving speakers for our codecamp so check it out and register for the event this August 27, 2011... I still need speakers so if you are interested in speaking you can submit sessions too. 

Currently rated 3.2 by 11 people

  • Currently 3.181818/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: BayerWhite
Posted on: 7/6/2011 at 4:52 AM
Categories: General
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Unversal Providers for ASP.Net

Just hooked up the Universal Providers via NUGET which provide the framework for handling much of what we already have for Membership, Roles and Sessions but is universal moving forward with Azure and Sql Compact. Check out Scott Hanselman's blog to learn more.

Currently rated 3.0 by 10 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: BayerWhite
Posted on: 7/6/2011 at 2:11 AM
Categories: General
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Jaksonville's CodeCamp "Call for Speakers"

We have finally launched the site and have made our initial "Call for Speakers"! If you are interested in being apart of this year's exciting event by either speaking or volunteering please visit http://www.jaxcodecamp.com. If you have any questions please contact me. The event wll be held August 27, 2011!

Currently rated 3.0 by 10 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: BayerWhite
Posted on: 6/10/2011 at 1:33 AM
Categories: General
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Speaking at Tallahassee's WIndows Azure Boot Camp

Looks like I will be heading to Tally in June to speak at a Windows Azure boot camp. This is a real honor to be invited to speak and I look forward to helping others ramp up on Azure. If you are interesed, you can register for day1 and day2. I can't tell you how excited I am about being at this venue!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: BayerWhite
Posted on: 4/19/2011 at 3:53 PM
Categories: General
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Handling Many to Many in Entity Framework 4.0

Recently, I have had some questions on setting up "Many to Many" while using a layered software model with EF4.0 using POCO objects. Hopefully this post helps clarify how to handle the database integration while preserving the business domain model and reducing code. In layered code I use the following components.

 

Service contracts - Contract that a service implements

Services – objects that define functionality for a domain entity

Business Managers – objects that define custom business logic for a service

Data Servers – objects that define what will be pushed and pulled from a data source

Entities – objects that mimic data source objects or tables

Factories – objects that utilize one or more services for building categorized functionality

 

Out of the above objects, the two that are customized the most are the Data Server and Entities but each component is generated for each table within a database. The Data Server changes are driven by business requirements for data interaction with the database. POCO entity changes are driven to close gaps between business entities and the business process. This usually consists of changing single objects to composite objects, but depending on the business goals code for "many to many" objects can be minimized or omitted entirely. So how do we do this? Take a look at the following example and let's go step by step...

 

Below is a Customer table and AddressLocation table. Because of the many to many relationship I created the CustomerDropShipment table so a customer can have many AddressLocations that can be used as dropshipments for online purchases. When working with without Entity Framework, I would generate the above layers for all three tables, but with Entity Framework I only have to generate the layers for Customer and AddressLocation and generate the additional POCO object CustomerDropshipment and add the scaler property, "CustomerDropLocations". You will also notice the "DropShipments" collection was added as well We add these to make it easier and more natural for creating and retrieving the dropshipments for a customer. 

 

 

 

 

 

Next, lets look at the code that handles all of this. The below code is a natural way based on the current business domain for adding multiple dropshipments for an existing customer.

public void CreateCustomerDropShipment()

{

   try

   {

      Customer existCustomer = new Customer() { CustomerId = 37 };      existCustomer.DropShipments.Add(new CustomerDropShipment()

      {

         DropShipmentLocation =
new AddressLocation()

         {

            Address = "5434 Dropshipment Way 2",           

            City = "Dropshipmentville2",           

            LocationName = "Dropshipment 2",

            StateId = 1,

            Zip = "54345-08"

         }

      });

      existCustomer.DropShipments.Add(
new CustomerDropShipment()

      {

         DropShipmentLocation =
new AddressLocation()

         {

            Address =
"5434 Dropshipment Way 3",

            City = "Dropshipmentville3",           

            LocationName =
"Dropshipment 3",

            StateId = 1,

            Zip = "54345-09"

         }

      });

      var ret = Customer.Core.Factories.CustomerMgt.AddCustomerDropShipments(existCustomer);

   }

   catch (Exception ex)

   {

      throw ex;

   }

}

The magic behind the scene for processing the dropshipments is simplified as well

public bool AddDropShipments(Customer objCustomer)

{

   bool retSuccess = false;

   try

   {

      using (CustomerEntities db = new CustomerEntities())

      {

         var modCustomer =

            (from c in db.Customers

            where c.CustomerId == objCustomer.CustomerIdselect c).SingleOrDefault();

 

         if (modCustomer != null)

         {

            modCustomer.DropShipments = objCustomer.DropShipments;

         }

         db.SaveChanges();

         retSuccess =
true;

      }

   }

   catch (Exception ex)

   {

      throw ex;

   }

   return retSuccess;

}

Because the Customer scaler property DropShipments is of type CustomerDropShipment and we added the scaler property "DropShipmentLocation" we can get one or all of the dropshipment locations for a customer too.

public CustomerDropShipment GetCustomerDropshipment(CustomerDropShipment objDropShipment)

{

   CustomerDropShipment DropShipment = null;

   try

   {

      using (CustomerEntities db = new CustomerEntities())

      {

         var retDrop =

         (from d in db.CustomerDropShipments

         from l in db.AddressLocations         where d.LocationId == l.LocationId

         && d.CustomerId == objDropShipment.CustomerId

         && d.LocationId == objDropShipment.LocationId

         select new { d, l }).SingleOrDefault();         if (retDrop != null)

         {

            DropShipment =
new CustomerDropShipment() { CustomerId = retDrop.d.CustomerId};

            DropShipment.DropShipmentLocation = retDrop.d.DropShipmentLocation;

         }

         return DropShipment;

      }

   }

   catch (Exception ex)

   {

      throw ex;

   }

}

public Customer GetCustomerDropshipments(int CustomerId)

{

   Customer objCustomer = null;

   try

   {

      using (CustomerEntities db = new CustomerEntities())

      {

         var retDrops =

         from d in db.CustomerDropShipments

         join l in db.AddressLocations on

         d.LocationId equals l.LocationId

         where d.CustomerId == CustomerId

         select new { d, l };         objCustomer =

new Customer() { CustomerId = CustomerId };         foreach (var drop in retDrops)

         {

            var dropshipment = drop.d;

            dropshipment.DropShipmentLocation = drop.l;

            objCustomer.DropShipments.Add(dropshipment);

         }

         return objCustomer;

      }

   }

   catch (Exception ex)

   {

      throw ex;

   }

}

So in short using Entity Framework 4.0 can reduce code for layers that normally would generated by handling the modeling for relationships in this case, between Customer and AddressLocation tables through the DropShipmentLocation scaler property.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: BayerWhite
Posted on: 4/6/2011 at 2:46 AM
Tags: , ,
Categories: General
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

My Windows Phone 7 == More Productive

It has been a couple of weeks since I purchased my WP7. I decided to get the Focus because of it's bright screen. Quite honest, I have never been this satisified with a phone. Microsoft did a bang up job! Shhhhhh Shhhhhh Shhhhh...<quietly>Now my wife has the IPhone. Most of my friends would say, "If you were the man of the house you would change that!". Well it is not that easy! Anyone else happily married would understand!</quietly>But lately I have been doing some comparisons between the two.Iphone, great if you want to sit around the local Starbucks and look really cool surfing the web while sipping on a sugar drink. Window Phone 7, for when you really need to get business done. "Texting clients...great", "Lost on the road or in the woods...found","talking on the phone and multitask with other programs...easy","navigating the screen with short little hands(if you have them)...feel big". You get the picture, I am impressed. I am more likely to forget to put on my underwear then forget my phone in the morning. It looks cool, does what I want it to do, it is fast and if I was single I bet I would have a ton of hot chicks walking around me just by lifting a windows phone 7 to my ear...Bottom line, Get one!

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: BayerWhite
Posted on: 2/11/2011 at 12:24 AM
Categories: General
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Integrating with Entity Framework 4

I have been working with Microsoft's ORM technology ever since LINQ2SQL came out in 07', however before Microsoft decided to get into the ORM business, I had crafted my own ORM framework which allowed me to easily integrate data and business code within solutions I worked on. Once L2S came out I decided to integrate my ORM tool with it that way I could rely on the graphical modeling tool and transaction functionality that came out of the box. Then Microsoft decided to push Entity Framework shortly after L2S and also pointed out that EF would be in the basket with all the apples (compared to L2S). Since then some comments from the community were made about how L2S has its advantages and that it should still stay on Microsoft's radar. However, when I first started working with EF early on I thought it still had some challenges. I spoke on EF early on at a couple of user groups but for projects I was still using L2S or my custom ORM tool.

Now that I have started integrating EF 4.0 into my custom framework I have been real excited with what I have seen. I have a better looking graphical tool, easy way for updating my models and the same support for transactions. On top of that, and what I think brings it to the top is the support and customization for working with POCO (Plain Old CLR Objects) and Lazy loading, which allows you to define the relationships within code as well as the model and have them automatically loaded within the CLR objects. These features are the basis for what it takes to integrate existing ORM technologies with EF therefore being able to hit the ground running with existing code.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: BayerWhite
Posted on: 9/16/2010 at 3:21 AM
Categories: General
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Looking Back at JaxCodeCamp 2010

We had a great time last Saturday hosting http://www.jaxcodecamp.com at UNF. We had around 530 with about 430-440 attend. One of the closest amounts of registered vs. attendee ratio. I want to thank the many speakers, sponsors and vols that helped make our event successful. For more info and feedback, visit http://www.twitter.com and so a search on #jaxcc.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: BayerWhite
Posted on: 9/1/2010 at 7:53 AM
Categories: General
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

WP7 All-Day Event at JaxCodeCamp Aug. 28, 2010

Register for the events below at Jacksonville's Code Camp at http://www.jaxcodecamp.com 

SESSION1 – Windows Phone 7 Overview – A Look at the platform, the phone, and the ecosystem around it.  Full hands on walkthrough and demo of Windows Phone 7.  Explore the application approaches, the developer ecosystem and see some sample applications  - Joe Healy – Microsoft -  http://www.devfish.net

SESSION2 – Silverlight for Windows Phone 7 – Henry Lee – New Age Solutions - You’ve heard the fundamentals; now it’s time to dig a little deeper. This session will focus on building Windows Phone 7 applications with Microsoft Silverlight. You’ll see first-hand how to use Visual Studio 2010 and Expression Blend to develop and debug projects. You’ll also learn about the built-in templates and the many available controls and styles for WP7 - http://www.newagesolution.net/Blogs/NewAgeSolutionBlog/tabid/412/BlogId/14/Default.aspx

SESSION3 – XNA Dev Game Programming for Windows Phone 7 – Microsoft XNA has been a favorite with game developers for many years. Now game developers will be able to harness the power of the XNA framework to create  highly immersive and responsive games for Windows Phone 7.. Bill will charge full-speed into XNA to outline the basic Windows Phone model, explore its core device characteristics, and review the highlights of the XNA phone framework. Finally, he’ll show you some of the cool and impressive games that have been developed specifically for Windows Phone 7. – Bill Reiss – http://www.bluerosegames.com

SESSION4 – Real World WP7 App From Scratch –– Creating a currency conversion application on the fly from scratch - Application Bar – Location Service - Rx.Net – Web Service Calls - Web Browser control  - Push Notifications - Tile notifications- Toast notifications - Eugene Chuvyrov -- http://twitter.com/EugeneChuvyrov

SESSION5 – Monetizing Your Passion Through Windows Phone 7 -  Windows Phone 7 will launch with a fully loaded Marketplace and the opportunity for developers to sell or distribute their applications. . In this session, you’ll get the details about how to navigate the certification process and publish your application including updates. Learn how to increase discoverability as well as deepen your connection with your customers through the powerful business intelligence capabilities of the marketplace.- Nikita Polyakov - http://geekswithblogs.net/campuskoder/Default.aspx

SESSION6 – Windows Phone 7 LoadFest and Open Lab – Come to an open “build-a-phone-app” session and work on labs or your applications.  If you have an app ready to test on a 6414 Flashed Windows Phone we’ll have a setup available for you.  If you don’t have the developer environment for WP7 installed, this is a fantastic opportunity to drop the tools and the Windows Phone Training Kit onto your machine.  Greg Leonardo - http://www.codefertilizer.com/ and friends.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: BayerWhite
Posted on: 8/19/2010 at 7:59 AM
Categories: General
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed