Click here to Skip to main content
15,908,020 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Code First Pin
kalberts11-Oct-18 1:12
kalberts11-Oct-18 1:12 
GeneralRe: Code First Pin
#realJSOP11-Oct-18 1:24
professional#realJSOP11-Oct-18 1:24 
GeneralRe: Code First Pin
Member 1126470618-Oct-18 20:27
Member 1126470618-Oct-18 20:27 
GeneralRe: Code First Pin
HobbyProggy11-Oct-18 1:31
professionalHobbyProggy11-Oct-18 1:31 
GeneralRe: Code First Pin
Member 1126470618-Oct-18 20:33
Member 1126470618-Oct-18 20:33 
GeneralRe: Code First Pin
Richard Deeming11-Oct-18 1:35
mveRichard Deeming11-Oct-18 1:35 
GeneralRe: Code First Pin
Jacquers11-Oct-18 2:10
Jacquers11-Oct-18 2:10 
GeneralRe: Code First Pin
raddevus11-Oct-18 2:22
mvaraddevus11-Oct-18 2:22 
This is way too long but your question got me thinking and I just wrote it up.

It seems that CodeFirst was a way to get devs to :
"Do design in small chunks."

Some devs are not going to plan at all. They just start typing code.
A lot of those devs were very good at doing this and could really make things happen.
But others were terrible at it and created huge maintenance nightmares.

So a type of methodology arose out of that which said, "Hey let's make a process out of the idea of typing code. We need to provide a basic process."
Just Code It Up
In the beginning, many devs just typed code which was imperative in nature -- you tell the code what to do and it does it.

Along came OOP. But a lot of devs saw it and just said, "that's a lot of overhead, I can do it faster just by typing up some code" and continued just to "code up a solution".

OOP Wave
But OOP is about code organization and some people said, "Hey, you need to design things very well and think out everything so you can model the objects in the system and you should have everything planned out so you can go and create the system."

But it didn't catch on with a lot of devs because they knew that requirements change and you can't design any large system entirely before building because when you do you miss stuff.

But then many devs were like, "Well, we don't want to go back to just coding things up with no plan either."

Along Comes Agile
Model one domain object and get it working. Get the MVP (minimum viable product) so we can have a bit of design but actually start writing code and having things running very fast. This made the pantsers (coding by the seat of your pants) happy and made the strong OOP devs happier because at least there was some organization and process built into the system.

Everything else is just these two factions fighting it out:
1. Pure Agile - (design it on the fly)
2. Heavier process (design more up front / create large domain model ("all" objects in your system))

Reality: Stuck In The Middle
Real life is somewhere in between.
The Code First thing is a technological process that helps the first group (Pure Agile) to get to what they want with fewer technical barriers. Now they can model an object and it'll be serialized to the database with little work and each time they model a new object their domain model becomes more solid.

Of course Code First is also a process that is dev-centric where maybe you have devs that don't have as much experience with databases and they just want to get things serialized to db fast and easy.

Should you use Code First? Depends on your shop and how your projects are managed but everything is going to require some discipline.

For smaller projects or prototypes that you need to do fast, it probably is very nice.
But on large projects where you know there will be future maintenance you probably want to control every aspect of your system and may move away from Code First.

Summary
1. In general when someone says, DB design first, it is because they are thinking about more up front design (which is probably a very good thing).
2. In general when someone says Code First they are probably building a quick prototype or attempting to create the first revision of the design or they are implementing a stronger Agile approach with the discipline of designing the model along the way.
GeneralRe: Code First Pin
F-ES Sitecore11-Oct-18 2:45
professionalF-ES Sitecore11-Oct-18 2:45 
GeneralRe: Code First Pin
raddevus11-Oct-18 3:56
mvaraddevus11-Oct-18 3:56 
GeneralRe: Code First Pin
F-ES Sitecore11-Oct-18 4:30
professionalF-ES Sitecore11-Oct-18 4:30 
GeneralRe: Code First Pin
raddevus11-Oct-18 4:45
mvaraddevus11-Oct-18 4:45 
GeneralRe: Code First Pin
Member 1126470618-Oct-18 20:42
Member 1126470618-Oct-18 20:42 
GeneralRe: Code First Pin
Eric Lynch11-Oct-18 5:18
Eric Lynch11-Oct-18 5:18 
GeneralRe: Code First Pin
raddevus11-Oct-18 9:10
mvaraddevus11-Oct-18 9:10 
GeneralRe: Code First Pin
R191112-Oct-18 3:14
R191112-Oct-18 3:14 
GeneralRe: Code First Pin
Gerry Schmitz12-Oct-18 4:00
mveGerry Schmitz12-Oct-18 4:00 
GeneralRe: Code First Pin
raddevus12-Oct-18 4:04
mvaraddevus12-Oct-18 4:04 
GeneralRe: Code First Pin
Gerry Schmitz12-Oct-18 4:35
mveGerry Schmitz12-Oct-18 4:35 
GeneralRe: Code First Pin
Foothill11-Oct-18 3:18
professionalFoothill11-Oct-18 3:18 
GeneralRe: Code First Pin
MarkTJohnson11-Oct-18 3:25
professionalMarkTJohnson11-Oct-18 3:25 
GeneralCode Last Pin
Marc Clifton11-Oct-18 3:50
mvaMarc Clifton11-Oct-18 3:50 
GeneralRe: Code Last Pin
Mycroft Holmes11-Oct-18 11:57
professionalMycroft Holmes11-Oct-18 11:57 
GeneralRe: Code Last Pin
Marc Clifton11-Oct-18 13:43
mvaMarc Clifton11-Oct-18 13:43 
GeneralRe: Code Last Pin
R191111-Oct-18 19:57
R191111-Oct-18 19:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.