Welcome Guest, Not a member yet? Register   Sign In
Using fancy database introspection to create small web applications - ideas welcome
#1

[eluser]Jay Callicott[/eluser]
I have seen database introspection cleverly used to create scaffolding in frameworks like code igniter and ruby on rails. Always they are intended to get you up and flying while you flesh out your application.

How far has this gone? I know that it you can pretty easily determine what type of field and to some extent what validation to use based on type, such as validating numbers only for an int field, showing a textbox for a medium text field.

How do you see all of the options if the field is an enum? I haven't tried that yet. That would make populating a dropdown pretty easy. I haven't tried foreign keys, are those support in mysql 5? I think they are. That would help with establishing relationships.

My thought is wouldn't it be cool for small apps to have a one-size fits all solution where you could design a database and use a generic solution that would show reports and forms all based on database introspection. It would even create the navigation for you and you would have maybe a configuration table for the design/layout.

For reports you would create views (mysql 5) and it would look for all views (show all views or whatever the command is) and have datatable + pagination and search for each view.

You could plug it into a generic user authentication system or have something simplified.

The goal being basically ok you have a small budget client who may eventually need a full blown web app but right now they just need something simpler and the competition is maybe a Micrososft access database/application. That obv has issues when deployed to the web whereas this other solution would have simple forms, reports and whatnot and be web ready.

Development time wouldn't be that much and they'd have a mysql database there that could be the base for further application development later.

Maybe there's something like that already, not sure. But that would truly be database driven.

Jay
#2

[eluser]llbbl[/eluser]
mysql owns. forgien keys have been around for a while (maybe even since version 3) through the use InnoDB tables. The defualt MyISAM tables do not support them.

Look into using Navicat w/ MySQL. This program will allow you to generate reports and enter data into the database with a interface similar to msft access.

btw that post was really long /cry.
#3

[eluser]Jay Callicott[/eluser]
Ya I don't know that Navicat is the point, that's just a GUI for MySQL. I think my idea is pretty good, not sure what "long cry" means.

Ya if you use InnoDB you can use foreign keys. Doing introspection for foreign keys is a little tricky, but basically you could create an application that just uses introspection to flesh out a whole app workflow. I think it would work.

The reason I'm thinking of this is that we have a potential client that just wants a small app like this and this sort of thing would work I think if it existed.
#4

[eluser]llbbl[/eluser]
It means your post was on the lengthy side.

I don't know what your talking about with introspection, unless you mean to think inside onself.

It didnt' sound like you wanted to build a complete web application with data entry & data viewing. It sounded like you wanted something simple. Well navicat is something simple. Its a lot better than msft access.
#5

[eluser]Jay Callicott[/eluser]
OK well this post will be shorter.

I mean using SQL commands to "figure out" what the db author was intending to do could be used to flesh out a whole application. INT means enforce numbers and use a textbox, enum = 'drop down', foreign keys also mean a drop down, views mean reports. This would automatically implement the data entry for each table and include reports for data viewing. It wouldn't be for me, it would be for clients. NaviCat to my knowledge is a developer tool. My idea is to build a CI app that automatically builds out a workflow for a database simply by internally examining the contents of each table. The goal of this being that you could build small applications very fast.

This wouldn't go as far as Microcrap Access with point and click to build the db but it would be a nice tool. If it could be extended through modules or something it could be very powerful I would think.

Basically it starts with introspection to flesh out the app but this if you override a controller or something it customizes it? Not sure but it seems like it could be cool.
#6

[eluser]llbbl[/eluser]
Ah ok I understand now what you are saying. Thanks for elaborating. Sorry for not following there.

I think CI would be great for that. Something like that would take me about a week to do without CI and maybe only a couple days with CI. Not much time needed.

I think you are going to spend several weeks trying to build this automatic database thing when you could just build the web app in much less time. Doesn't sound to me like a worth while thing to do.

Also my point about Navicat is if you have a 1/2 way intelligent customer who has used a application like Msft access before, but doesn't want to spend the $500-1000 on a web app like your talking about, than I would suggest just teaching them how to use Navicat.
#7

[eluser]Jay Callicott[/eluser]
Well I will stop you at 1/2 way intelligent customer. Navicat doesn't make sense for most people. You're right that the automatic database thing would take more time or at least the same time as building the web app.

I might do it bc we have someone pending who wants a small application and their money could finance the generic solution but I don't know if there's enough other people out there wanting similar things to make it worth it still.

That is unless I could add a plugin system or something that makes it easily extendable and then maybe it has more use. It would be fun to work on I think.

Our clients typically want websites more than they need a small web app, but I suppose we could pitch them on a small web application. Or it'd be easier to make bids for freelance projects for example. I might do it, who knows.

It's probably harder than i think it is but if we get it financed I still might try.
#8

[eluser]Jay Callicott[/eluser]
The only thing I can think of lacking is for example labels for fields. Usually the field name and the field label look at least a little bit different. I would probably store that in the comments field, along with any other values I need in key value pairs or something.
#9

[eluser]esra[/eluser]
Have you tried CodeCrafter?
#10

[eluser]Jay Callicott[/eluser]
Nope, what is it?




Theme © iAndrew 2016 - Forum software by © MyBB