Code First, do you like it?
-
Interesting. Unfortunately, the world I live in revolves around "what can you give me in a certain time frame?". This does not lend itself well to theoretical software development, or hobby craft, where it may or may not work. Now, after a few years, and it has moved from philosophy into mainstream practice, then I would consider adopting. --> You used the phrase "may free us", in your linked page article, which has a certain level of uncertainty to me, hence the tone of my reply. :)
Some industries (financial services, mobile phone billing etc.) are already using this model. Unfortunately the code we/they use is very proprietary and this kind of thing is not used in college courses (yet). Commercial offerings do exist - in particular Event Store[^]
-
Just saw a demo online a few days ago, and the "demo guys" were having trouble with some areas with code first, and they were the "experts". So far, I am not entirely convinced that it is a development strategy worth using for the long term. We shall see, I guess.
Slacker007 wrote:
Just saw a demo online a few days ago, and the "demo guys" were having trouble with some areas with code first, and they were the "experts".
Can you share the link?
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
We are thinking about moving from database first, to code first, with our new projects.
I like it. Different from DB first, but the automatic db intialization is neat.
"A property doesn't have to be a Property to be a property." - PIEBALDConsult
-
Slacker007 wrote:
Just saw a demo online a few days ago, and the "demo guys" were having trouble with some areas with code first, and they were the "experts".
Can you share the link?
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
My buddy has it. Will post back with it when I get it. I watched part of the vid clip on his machine, not mine.
-
We are thinking about moving from database first, to code first, with our new projects.
-
My buddy has it. Will post back with it when I get it. I watched part of the vid clip on his machine, not mine.
:thumbsup:
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
Vark111 wrote:
Too many times someone makes a "minor" tweak to one or the other and then forgets to regenerate, then you're hosed.
I have read, and heard, many stories about this. It is one of our concerns.
But how many times has someone updated one, and forgot to update the other? At least with auto-generation, you're one click away from regenerating. With code first, you need to sit down and verify every recent change to ensure it has been incorporated.
-
:thumbsup:
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
Learn ASP.NET Online – Microsoft Virtual Academy[^] Under "Creating and configuring models" --> Creating models --> around 23:40 but start at around 22:00 to get some intro context. I heard that the SNAFU they had during the demo happens a lot to people, especially those who are trying to get up to speed with "code first".
-
Learn ASP.NET Online – Microsoft Virtual Academy[^] Under "Creating and configuring models" --> Creating models --> around 23:40 but start at around 22:00 to get some intro context. I heard that the SNAFU they had during the demo happens a lot to people, especially those who are trying to get up to speed with "code first".
Thank you! Will take a look..
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
-
Light roast (mild flavor), has more caffeine than manly, dark roast. Just saying. :-D Although, I prefer the flavor of a medium roast to a Sumatra, etc..
Definitely prefer a Sumatra or French Roast.:suss:
My long term goal is to live forever. So far, so good...
-
Definitely prefer a Sumatra or French Roast.:suss:
My long term goal is to live forever. So far, so good...
Whilst I prefer the one's that on sale. :)
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
-
Avijnata wrote:
In more than 50 percent of the cases.
You have done statistical analysis on this? :laugh: I have never worked for a software shop that did not require specs. I'm sure they are out there...50% of the time, at least. :) -- just teasing you.
:thumbsup:
-
I still prefer to design the database the traditional way, but the migrations that code first uses are pretty cool.
Can you elaborate on that please?
Regards, Nish
Website: www.voidnish.com Blog: voidnish.wordpress.com
-
We are thinking about moving from database first, to code first, with our new projects.
Frack no. It's the epitome of taking a very bad idea and following it ad absurdum.
-
I like to roll my own too - if you know what you are doing then it works well.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
GuyThiebaut wrote:
if you know what you are doing
Exactly; from what I see, the "latest and greatest shiniest new" tools are designed for a different demographic. :suss: If you don't know what you're doing, better have someone else do it for you.
-
Can you elaborate on that please?
Regards, Nish
Website: www.voidnish.com Blog: voidnish.wordpress.com
-
We are thinking about moving from database first, to code first, with our new projects.
I do indeed. You need to spend some time ensuring that your entity changes will produce the database design you're expecting (e.g. table-per-class, table-per-hierarchy etc...) and you may want to write some helpers to make adding things like indexes a bit easier but otherwise I've found it to be a very neat way of doing things. One thing to consider though is your initial database creation, for this I'd suggest either having a script to create the database and manage the configuration of it (not my preferred) or create a Database Project and output a DACPAC (much better and has better deployment options if you're using MS SQL Server). The reason for this is that if you use something like EF migrations then you'll get default database settings and sizings when it's created which you may not want, using a DACPAC means you get control over things like collation and recovery modes.
Eagles may soar, but weasels don't get sucked into jet engines
-
If you ever meet me: You won't like me before I had three mugs of strong coffee that day. Just see my signature.. :)
Get me coffee and no one gets hurt!
Hm, how does your heart manage with all that caffeine? I'm genuinely curious as I've tried drinking more coffee but it only made my heart beat faster, my mind was still very interested in sleeping. :) Or maybe I haven't developed a tolerance yet - haven't been drinking coffee regularly for too long.