Live data from Hacker News

Why Is Front-End Development So Unstable?

breck-mckye.com

341–350 of 366 posts

Re: Why Is Front-End Development So Unstable?

#341
post #259

Earlier quoted context omitted.

On any project of sufficient size there will be fairly advanced reporting functionality that you generally will not be able to do using ORM so you will end up with a mix of ORM and direct SQL. Also ORM forces you to the lowest common denominator for supported RDBMs I generally do not want to be limited to the SQLite features if I am running PostgreSQL

I did qualify my statement with “for simple queries”. For more complicated queries, a pattern I have become quite fond of is making database views and then using them as the backing table for an ORM model. In Rails, at least, this gives you the best of both worlds.

Yep that works well for many use cases

Re: Why Is Front-End Development So Unstable?

#342

Earlier quoted context omitted.

About 17 years ago, I wrote a GUI-based code generator that allows me to generate the boilerplate JDBC cruft from SQL statements, with several options for common scenarios. The code it generates is extensible and provides helpers for extending. To this day, I haven't found anything (including ORMs, Spring support, etc.) easier to use, more flexible, or more sensible.

I recently wrote one for C# / MSSQL. I've been using EF on side projects, but work was concerned with it, so I just wrote a CRUD sproc / Entity / Repository / Service / DTO generator. Connect to a database and select the tables you want to build for, and done. 5 layers of abstraction in under a second. It gets me to about 95% of what I need and I custom build the special circumstance stuff from the generated objects.…

Yeah, very similar--with one primary enhancement: That is, I initially started generating objects-per-table, but found that it was a little limiting for a lot of use-cases I encountered. In particular, it didn't cover joins very well--particularly for queries that fed list views.

So, I expanded into supporting raw SQL SELECT queries that can include joins, which I parse and combine with DB metadata. I then generate the DTOs from there. So, a single DTO can have properties mapped to different tables, which I found much less redundant/limiting than entity-per-table designs.

In addition to the SELECT code, I can use simple checkboxes to also generate INSERT/DELETE/UPDATE/UPSERT code, which map the DTOs back to the underlying tables. It recognizes keys and includes multiple-table writes in a single transaction, etc. In addition to the DTOs and the DAO layer, it can also optionally generate a service interface.

Of the utilities I've written over the years, it is the one that most stands out as having paid me back incalculably.

Re: Why Is Front-End Development So Unstable?

#343

Earlier quoted context omitted.

About 17 years ago, I wrote a GUI-based code generator that allows me to generate the boilerplate JDBC cruft from SQL statements, with several options for common scenarios. The code it generates is extensible and provides helpers for extending. To this day, I haven't found anything (including ORMs, Spring support, etc.) easier to use, more flexible, or more sensible.

Is it closed source? I am in search for something like this. I consider this as Naked Object approach.

Unfortunately, it is closed and wired into an overall framework I crafted, so has some dependencies there.

If I were to write it today, I'd be more conscious of limiting dependencies and generally designing with open-sourcing in mind.

Re: Why Is Front-End Development So Unstable?

#344
post #259

Earlier quoted context omitted.

On any project of sufficient size there will be fairly advanced reporting functionality that you generally will not be able to do using ORM so you will end up with a mix of ORM and direct SQL. Also ORM forces you to the lowest common denominator for supported RDBMs I generally do not want to be limited to the SQLite features if I am running PostgreSQL

I did qualify my statement with “for simple queries”. For more complicated queries, a pattern I have become quite fond of is making database views and then using them as the backing table for an ORM model. In Rails, at least, this gives you the best of both worlds.

Using PostgreSql, I tend now to directly generate query result in json.

It implies an architecture model where you put the business logic and type safety in the RDBMS.

It reduces the number of layers for a lot of functionalities.

Re: Why Is Front-End Development So Unstable?

#345

Earlier quoted context omitted.

I did qualify my statement with “for simple queries”. For more complicated queries, a pattern I have become quite fond of is making database views and then using them as the backing table for an ORM model. In Rails, at least, this gives you the best of both worlds.

Using PostgreSql, I tend now to directly generate query result in json. It implies an architecture model where you put the business logic and type safety in the RDBMS. It reduces the number of layers for a lot of functionalities.

How does version control work for an architecture like this?

Re: Why Is Front-End Development So Unstable?

#346
post #97

Earlier quoted context omitted.

I hate the fact that Ruby doesn’t get more love. It’s a great language on its own. It doesn’t need Rails.

I like Ruby, I hate Rails. But Sinatra is awesome.

LOVE Sinatra. It’s so easy to get a web app going with it, and it’s super easy to test against!

Re: Why Is Front-End Development So Unstable?

#347
I know that the star is a de-facto way to calculate the popularity of particular repo. But, let me put aside this calculation for a moment, then I myself have stats around 250 repos and more than 40% of it, I have starred just because to refer it sometime later, not because I like it or love it, just for future ref., when I have to work on something that might need help or ref. from that particular repo.

So, if there is something that have a way bookmarks the repo then chances are hight these repos have lesser stars. Also, there is popular trend nowadays I see that 100 other developers have starred one repo for some particular reason that chances are hight that other 5 developers might star it because they just follow the developer, who have starred.

Re: Why Is Front-End Development So Unstable?

#348
OP mentions using a framework.

Alternatively to Next there is Reframe (https://github.com/reframejs/reframe)

My main problems with Next is that it is

- not ejectable (and locks you in),

- not a universal framework (you cannot create an app that has a static `/about` page but a dynamic `/search` page. With Next your app is either all static or all dynamic.)

(I'm Reframe's author.)

Re: Why Is Front-End Development So Unstable?

#349
post #321

Earlier quoted context omitted.

Nobody owes me anything but eaach and every on of us owe something to the FOSS community.

No, we don't. The FOSS community operates on the idea that people that want to contribute to it (financially, programming, etc) can do so. Nothing about open source obligates that behavior, outside of certain licenses. Nobody "owes" FOSS anything either, that's up to them.

It is really shocking people can think this way when also making use of hundreds of people's free labour, and when the very existence of most of programming careers are a direct product of OSS innovation. Hopefuly this attitude is not the widespread one.

Re: Why Is Front-End Development So Unstable?

#350
post #349

Earlier quoted context omitted.

No, we don't. The FOSS community operates on the idea that people that want to contribute to it (financially, programming, etc) can do so. Nothing about open source obligates that behavior, outside of certain licenses. Nobody "owes" FOSS anything either, that's up to them.

It is really shocking people can think this way when also making use of hundreds of people's free labour, and when the very existence of most of programming careers are a direct product of OSS innovation. Hopefuly this attitude is not the widespread one.

Plenty of people get paid to work on OSS. I imagine that Linus is pretty well compensated.
Post reply on HN