Microsoft Re-naming Hell

Had to install SSIS dev tools today, and realized that Microsoft has changed the name of the tools to “Sql Server Data Tools” for Visual studio 2012. All nice and dandy, but what they did not tell you is that there are 2 packages that do different things with the same name. aarrrrrgggh.

Soooo, for the people that are looking for the tools formerly known as Business Intelligence studio here is the links to the different products.

Hope this clears up the confusion for some.

Till next time.

Advertisements

Entity framework membership and role provider for MVC 3 and bootstrap

 

I recently started on a new implementation built on Microsoft MVC3. The problem I had was using the ASP.Net role and membership providers that ship out the box. They depend on a database created and configured using the ASP.Net forms auth tools , and sit in there own little database on sql server(or express or compact, whatever you are using). You can get around that by adding your data to the standard created database , but that’s kind of a hack(Not so cool Sad smile )and the fact is that I am using EF-Code first that provides me with some nice features for rapid development and proto typing of needed functionality thus the schema of the database will change quite a lot during the development process.

Digging a bit deeper into the out of the box forms auth , I found that there is also quite a lot of functionality that I would not use and thus the whole idea of using the out of the box forms authentication went out the window. Managing 2 databases (the forms auth one and then my own one) = not cool. Bloated code that has no use in the context = not cool.

So I decided to write my own providers to simplify my life for this project and for future projects with similar requirements (there will be plenty of them I’m sure.) I implemented 2 classes that inherit from the default providers to roll my own simpler authentication namely:

    public class CustomMembershipProvider : System.Web.Security.MembershipProvider   {}
    and
public class CustomRoleProvider : System.Web.Security.RoleProvider   {}
    NOTE: You have to then implement all the base methods from the abstract class inherited from and hook them up to the web.config and controllers, but its left out of this post as it is beyond the point that I am trying to make.
    I hooked it all up using Entity framework for storing the data in my own data structures, replacing the default providers with my own in the configs , and modified the default account controller in the MVC 3 template as provided and SHABANG !!!!!! ALL DONE.
    It all worked like a charm and provided a simplified mechanism with exactly what I needed.I then read up a bit about simple UI and designs for MVC (since I am not a design guru I generally try and see how other people do it Smile) and I came across an article of a gentleman by the name of Ryan Hayes. He has created a nifty little mvc3 template for VS2010 that contains an implementation of the open source EF-Code First Provider  membership provider that does pretty much exactly what I wanted. (Nice timesaver for people interested).
    He also made use of a very nice little framework from the guys at twitter called Bootstrap that helps quite a lot with look and feel for technical people like me. I found it very nice and useful for making your apps look quite slick when you are artistically impaired like myself.

How to make your MAC-OS shell look pretty

If you are from the Linux world or maybe familiar with the Ubuntu shell (or any other distro you prefer) like me, then you would find the Mac OS shell quite dull. It is pretty much black text on a white background by default and that is not always nice when executing commands or when spending some time in the shell. For example , when you run the “ls” command you would like to see the highlighting in differences between files and directories, or read-only and executable files. This functionality is default in Linux but in Mac …….. well……. not so much.

I will explain in some detail in this post how to make your Mac shell a tad more nicer with some colouring via some screenshots taken on my Development box.

(Note: to take screenshots on MAC you can use the following commands :

  • Command-Shift-3: Take a screenshot of the screen, and save it as a file your desktop
  • Command-Shift-4, then select an area to capture and save it to the desktop
  • Command-Shift-4, then space, then click a window and save it to the desktop
  • Command-Control-Shift-3: Take a screenshot of the screen, and save it to the clipboard
  • Command-Control-Shift-4, then select an area and save it to the clipboard
  • Command-Control-Shift-4, then space, then click a window and save it to the clipboard )
  • We first need to open up a terminal and then type in the command to open up the profile file (Very important that if this file does not exist you would have to create it in the root of your home folder). This is done by executing the command “edit ~/.profile”
  • Screen shot 2011-08-12 at 11.03.06 AM

  • You can then add the following exports as depicted in the image below to add colouring to the commands of your terminal for your profile.       Screen shot 2011-08-12 at 11.03.33 AM
  • You can then close your terminal, and open up a new instance.
  • Then run the following command “ls” to see the colouring magic applied on your terminal.
  • This is GREAT, but we are still stuck with the burning white as a background in the terminal. To change this you need to click on the preferences of the terminal once a terminal is open.Screen shot 2011-08-12 at 11.07.35 AM
  • When presented with the preference screen , you can select your theme (mine is set to homebrew) and set that as default.Screen shot 2011-08-12 at 11.08.12 AM
  • Then close your terminal , and open up a new instance.
  • You will then see the colours has changed, and when you run the “ls” command you will see the colouring on terminal commands as well. Screen shot 2011-08-12 at 11.09.00 AM

That’s it for changing your shell to look similar to the Linux one. Have fun , and let me know if you struggle.

 

NOTE: If my images look funny that’s because I blocked out the computer and user name from the shell with the red block, so yours will definitely look different there. Smile