SubSonic to the rescue
26 Dec 2010 Leave a Comment
This is a continuation to my post regarding my experience with LinqToSql(L2S), I was reading along other alternatives to the current ORM I am using
I saw someone mention SubSonic, so I started reading, Click Click Click.. Clicked some links and viola i found it!, it promises an easy interface and it uses “Text Template Transformation Toolkit”(T4)
the same technology L2S is using when generating the Models from the Database Schema. T4 itself is new to me, although i have dealt with code generation from my previous company likewise with my current company.
I haven’t really bothered investigating on how they approach Code Generation because I cant use it outside of my work’s scope here comes T4!! i’m getting really exited and the possibilities on where i can use it.
Anyway i’m getting off topic, so I learned today to save(persist) a record in SubSonic you just need to call .Save() how convenient is that?
the migration was pretty straight forward from L2S to SubSonic, just added some assemblies deleted my Save Hack in L2S to call .Save() pretty much that’s it!
here is the SubSonic website.
Ants II
26 Dec 2010 Leave a Comment
this is a continuation of my previous post, a couple days back I blogged about ants crawling into my desk, little did i know that they were starting to colonize my keyboard.
i just found out today when i tried to shake me keyboard to get rid of some dust… little ants falling from my keyboard…”waaaaahh”(ants falling)
I said to myself OK, maybe its time to clean this keyboard up, i went outside and started unswerving the screws.
to my surprise, lots and lots of ants are living inside my keyboard. I assume every keypress I make some ants would die and shed their blood on the plastic circuit.
I notice the rubbery push button things inside the keyboard are ruined because they have started chewing on it.
that was probably the reason why my “A” key is so soft, mystery solve lol!
LINQToSQL a big disappointment
25 Dec 2010 Leave a Comment
I’m new to LINQToSQL, but I made several research before hand regarding the technology.
I’m still in Phase 1 in my new project, and still trying things out. but I am already thinking of abandoning LINQToSQL for a better ORM Framework.
I usually get excited when I learn “new” technologies, but working with LINQToSQL and the worries it gives me in a long term basis have pretty much convinced me to abandon it.
Here are the pit falls I see, when using this technology.
1. When accessing an aggregate object in your entity (User.Profile.FirstName), LINQToSQL will go back to the database and fetch the data one by one on a per row basis. Imagine if you have tons of data, looping into it will require multiple round trips. Although you can solve this with what they call “projections”, i still think it defeats the purpose of having an object representation of your entities.
2. Updating data is weird, this is due to the fact web technologies works on a disconnected fashion. You need to do some hack to be able to update a certain entity, since you would have lost the instance of that object when the request is returned, first you need to fetch the data, then update the fields. then finally save the changes.
3. When deleting, you need to again get the data(to obtain reference) then that’s the time you can delete it, that’s 2 trips to the database.
Though accessing the objects directly are fancy and neat, without knowing the effects of those actions will hurt you in the end.
I am now reading about Entity Framework, and see if its a better choice.
Ants
21 Dec 2010 Leave a Comment
Today i discovered that there are red ants all over my PC, at first i thought the little dude was just lost or looking for food.
then i notice a battalion of ants are running around on my desk.
i squish them one by one, and thought that the skirmish was over, but i was wrong… their buddies were back to claim their fallen comrades, i have to fight back and got my insurance card to scrape them off my desk. pesky ants!
which reminds me of my funny dream once, i was dreaming of looking at little ants running around on the ground on a semi straight line. i was laughing when a stone was heading to wards my face. i was laughing so hard in my dream that, when i woke up i just started laughing really hard and freaked my sister out. it was around when i was at second grade. the same dream reoccurred when i got a fever that was in high-school, i was still laughing



