Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Architecture design for full stack development.

by talexb (Chancellor)
on Jun 23, 2017 at 18:20 UTC ( [id://1193398]=note: print w/replies, xml ) Need Help??


in reply to Architecture design for full stack development.

    While loading the database with some initial reference data (about 1GB), using one-off code that got fixed as I went along, I somehow managed to "lose" some PK values, because sequences do not roll back if accessed with nextval.

To simplify, it sounds like you're worried that a list of numbers with a gap (1, 2, 3, 7, 8, 9) won't sort as efficiently as a list without a gap (1, 2, 3, 4, 5, 6). I believe you don't need to worry about this, because a) it's not going to be an issue, and b) anyway, it's the database's problem.

    It was at this point that I realised I needed DBIx::Class, otherwise I would have layers of raw SQL hiding in any homegrown DBMS/Perl framework and that had to be avoided at all costs.

Hmm. I don't understand how this follows from the issue of having gaps in your Primary Key values. DBIx::Class is a fine module, and I'm sure it will work well .. but having raw SQL code in your codebase isn't a terrible situation.

Looking forward to hearing about the launch! :)

Alex / talexb / Toronto

Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

  • Comment on Re: Architecture design for full stack development.

Replies are listed 'Best First'.
Re^2: Architecture design for full stack development.
by anonymized user 468275 (Curate) on Jun 25, 2017 at 07:02 UTC
    raw SQL not terrible? Think about it like this: I am at the beginning of a complex development where the database is going to undergo many architectural changes most likely. If I can rely on DBIx::Class::Schema::Loader to update my model classes, then I wouldn't want to undermine that with raw SQL, but should co-operate with this gift I am given.

    One world, one people

      This really depends on your familiarity with Object Oriented Database design and coding, and your development goals. Sometimes the primary goal is getting to a Minimum Viable Product done, in order to show investors and potential users. Other times, you have the luxury of time, familiarity with the tools, and the desire to build it right from the ground up.

      I have used DBIx::Class on the job, and a few years back, I re-worked the examples in the POD -- but I really can't say that I'm comfortable with the module. If I were going to build a large project using this framework, I'd know ahead of time that I might be a bit slow at the beginning. I might even build a toy CRUD/BREAD application to get my eye in before starting on the real project.

      Alex / talexb / Toronto

      Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1193398]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-19 08:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found