on 2019 Oct 15 3:10 PM
Hi, I can create a webservice in DB and define its return type as HTML. Of course I can also write Javascript within the HTML too. My question, is it possible to host a complete website in the DB? Do I still need in this case PHP/ASP? What are the limitations in this regard?
Request clarification before answering.
Actually my website is almost whole website focused! I need it just to show/edit some configurations in the database. I dont have good experience with HTML/Javascript, so I will need the things one by one.
Just wanted to know whether there are theorically any limitations.
Thank you very much!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No limitations. The question is the flexibility & supportability. If you are fine writing HTML code with SQL commands, and you can do this pretty quick... then why not. But if you like VS/VS Code/PhpStorm/WebStorm whatever.... maybe it is a bad idea 🙂
> HTML/Javascript
Add HTML5 to that list, as in XMLHttpRequest to SELECT and UPDATE your database directly from inside your HTML code... mind-blowingly fast to execute, and mind-destroyingly hard to code and debug 🙂
let the select statement deliver the pure HTML content
Well, I guess Breck is talking about the possible requirement that the SELECT statement containing the HTML code itself might include script code to use XMLHttpRequest to call your own web procedures, cf. own of his according blog articles:
Calling Stored Procedures From HTML
Possibly "pure" but certainly not that easy to code and maintain...
> there should already be a ready tool
Oh, yes, there certainly should be! 🙂
> one can find an own way for automating this job
When you find it, please let me know... I am not being sarcastic, not a day goes by when I don't think "there's gotta be a better way".
But... be careful... you probably have a "Real Job" to do, and that Real Job may have a limited budget for "Building Tools".
In the meantime, if you have some particular task that's giving you trouble, ask a question here... there may be some powerful SQL technique that can help... I might not have any tools to offer, but I've had to work out many techniques over the years.
> I guess Breck is talking about
Exactly so. I was going to say "no" but then realized that's exactly what is going on... SQL-scripts-that-generate-HTML-scripts, even SQL--generating-Javascript-generating-HTML... it's not the quotes that cause the problems, it's the commas and the semicolons 🙂
No holy war here 🙂
Limitation 1: If your database is already a CPU bottleneck then maybe loading client GUI logic into stored procedures will not be Happy Times For You... maybe you want to divide-and-conquer when it comes to assigning CPU cycles to CPUs.
Limitation 2: Other than the STRING and LIST functions (which are wonderful, by the way), SQL Anywhere doesn't offer much support for application developers to create that client GUI logic... there is no developer's IDE GUI for generating HTML via Watcom SQL... none... not even a little bit 🙂
For the record, Foxhound's big bottleneck is caused by multiple separate ODBC proxy procedure connections to target databases (max 100 per Foxhound dbsrv17.exe instance, with -gn set to 220). The HTML generation has never ever been a performance problem... but then again, Foxhound only ever has a handful of GUI users.
Historically, Foxhound has had its own share of Queries From Hell, especially when it comes to scrolling through gigabytes of historical data... but QFHs are part of Database Life, nothing to do with this topic 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
60 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.