Friday, July 30, 2010

Programming BCS entity model in SharePoint 2010 - Part 1

Recently, I have completed one of my BCS, business connectivity service, entity models for SharePoint 2010 using Visual Studio 2010 and like to share some of what I have learned with you.

When I started this project initially, I couldn't find all the information, that  I needed to program a BCS entity model, from one single place.  I had to go to user forums at MSDN and visited few blogs to scratch my wonder like "uhmm, I don't know how to get this done in Visual Studio 2010."

So, here I decided to put everything I learned on this blog to share with you... hoping that this would help you get your BCS entity model completed easily.

Let's start...

1. Development Environment

Windows 7 64 bit,
SharePoint 2010 Foundation (here is how to set up >>>),
Visual Studio 2010 Professional w/ SharePoint tools,
MS SQL Express R2 64 bit w/ Northwind sample database

2. Create a new BCS project

I will here create a new BCS entity model for [customers] table in Northwind database, and do follow the steps explained below in the same order.

- change the name of BdcModel1 to BdcModel
- change the name of "Entity1" to Customer in all places
- change "Identifier1" to CustomerID
- change the name of "Entity1Service" to CustomerService
- check BdcModel.bdcm and BdcModel.bdcm.diagram files to make sure they no longer have BdcModel1, Entity1, Entity1Service, Identifier1, and etc.  You can manually update these files accordingly too.

After finishing these "renaming" steps, your model should be just like this.  The CustomerID is the primary key identifier in our model, so this CustomerID should be set up with the identifier field accordingly as well.  To make my job easier, I used the same name for both "Identifier" and "TypeDescriptor Name."


Before we proceed, please make sure that you have no warning and error messages from the first validation and compilation.

Thursday, July 29, 2010

Rails "Quick Start" Cheat Sheet

One day, one of my friends asked what tools/gems I normally use for Rails. My answer to his question was trying not to use many gems ;-)

As a software engineer, I most likely use only tools and libraries that came with the development tools and languages. To me, having or using many third party vendor's libraries keeps me very unorganized when developing. I know I have to admit that I am little lazy and reluctant to take new comers. But so far, it has been working perfectly for all of my projects. The projects were neat and other members in my team were able to easily compile/maintain my original projects and source files as well.

Going back to the original question above, these days I use the following plug-ins and gems only for my Rails projects and try not to use any other gems in a project for the same reason.  The following gems and plug-ins have been pretty much enough for my needs, but again you would need more than these for your own projects.   So, please ENJOY with Rails freely!

Nifty-Generators' layout
Nifty-Generators' authentication
Nifty-Generators' controller
Faker & Populator

** I really thank the developers, who built those and make our jobs easier **

What gems and plug-ins are you using with Rails for your project?

By the way, I made one-page Rails' cheat sheet for my friends and hope that this would be helpful to any Rails new developers.

Sunday, July 11, 2010

Clean up my Rails development environments...

I have not been working with Rails 2.x for a while, and recently I have upgraded my Ubuntu to the latest version 10.x. So, it was about the right time for me to revisit my Rails development environments to make sure that every modules/components get updated with the latest patches.

I did all of these while watching the final game of FIFA WorldCup, and my Linux virtual machine works perfectly on top of Windows 7 in my AMD 64x2 laptop.

Here is what I did for my development box ;-)

  1. I upgraded my VirtualBox to the latest version. Just realized that they changed the name of maker/provider from Sun to Oracle.
  2. I upgraded my Ubuntu to 10.04 Lucid Lynx. Yes, I really like their new user interface...very nice!
  3. I installed the latest version of Rails, and few gems that I am using such as Authlogic and Faker.
  4. I re-installed Komodo Editor 5 for my main editor for Rails. I like this editor better than gEdit for Rails project, and it really has been working great because Komodo Editor itself supports Rails folder structures. I added few key mappings for my needs to current profile as well.
(Komodo Editor 5 w/ Rails in Ubuntu Linux)

(settings in my preference)

Ok, everything seems to work fine for all of my projects in this new DEV box.
I revisited my web hosting account at RailsPlayground to install a couple of web-based applications under my domain too.

Rails has been a great web framework for my development needs (personal projects) especially for all kinds of database-driven web application in Linux, while I work as a .net/C# software engineer at my work.

I just want to thank everyone who's been working so hard to provide us such a great tool, framework, and utility...

Thursday, March 25, 2010

Hobo - another great way of Rails programming

This was copied from my new blog,

A couple of weeks ago, I read an article of Hobo from RailsInside and found it very interesting. So, I visited their web site and was able to get 2 free tutorial books in PDF. It was not that hard to understand Hobo way of Rails' programming, and I really loved it. I have not programmed any Hobo applications but will definitely try to build something with it. Until I post some updates of my Hobo story, enjoy yourself with Rails/Hobo.

What is Hobo?
Hobo is a collection of open-source gems/plugins for Ruby on Rails that help you build anything from throwaway prototypes and internal utilities to meticulously crafted full-blown web apps. The goal: write less code. So much less in fact that it starts to feel like you're not implementing your app at all, you’re just declaring what you want.

It turns out that the hard part is not going fast, but staying flexible. This is where we think Hobo really shines. If you’ve played with “app builders” before, you’ll know about The Wall. The Wall is the point you reach where you have to give up and do it the old way because that one feature you really need just isn’t going to happen. Hobo doesn’t have one.