Table Built from PHP
Onewing

html, php and a little javascript. There, now you know the extent of my web building knowledge. :)

Don't want to read my ramblings? Then go to the bottom of the post!

Anyway, I'm working on making my website (seems I almost never have time to). I've got all my games listed, ranging from ideas to completed to dead on my harddrive. Each game has a small, one paragraph description and a screenshot, plus a few button-slash-links for a spot on forums, a download, etc. Know, you put all of these sections on one page and you have a lot of scrolling to do. So, my idea was to put a table (literally) of contents at the top, with a hop link to the given game.

The table is built from php code that looks up a database storing information about the games. The table includes several things like what version, if it has a download, what I used to make it and so on. You can click the column title at the top of the table to rebuild the table sorted on that column.

I realized this was bloated so I'm creating a condensed version which only has the most important information. I also want to work on coloring the rows. Like, every other row when it is sorted by title and maybe color it by blocks when sorted by anything else.

Ultimately, this might be really slow, since when you click on a column header to rearrange the table, the entire page has to be regenerated (including the lengthy set of sections below). I suppose I could use a frame (or maybe an iframe?), but I'm not sure if that is a good route to take.

My question is, is building a table using PHP a good idea? Moreover, is it an acceptable coding practice or am I just abusing the concept of PHP here. Remember what I said at the beginning and my lack of web-building knowledge; I come up with ideas that I think are good but might have problems that my limited knowledge doesn't foresee. :)

X-G

It's a good idea, it's appropriate use of PHP, and it's recommended.

mEmO

I don't see how it is different than generating the rest of the page with PHP. In short, yes, it's a good idea.

[edit]

Blasted, I need to stop reading other forums while posting.

Onewing

Thanks!

Quote:

I don't see how it is different than generating the rest of the page with PHP.

This might be my biggest concern. The page itself is rather lengthy, and since the table is going to be sorted by whatever column header they click and the whole page is rebuilt, instead of just the table. I might be able to use iframe though, which was an idea I had writing the above post. I'll have to experiment with it.

Inphernic
Quote:

Ultimately, this might be really slow, since when you click on a column header to rearrange the table, the entire page has to be regenerated (including the lengthy set of sections below). I suppose I could use a frame (or maybe an iframe?), but I'm not sure if that is a good route to take.

Or you could use JavaScript to provide real-time sorting, falling back to regeneration where applicable.

BAF

Unless you have tons (and I mean tons) of data, it should't cause that much of a performance hit to reorder and regenerate the whole page.

Crazy Photon

And don't forget to not use tables for the layout, just for data. This website illustrates what I mean, and also has a lot of useful guidelines to build the web page.

bamccaig

I wonder how JavaScript would perform sorting the data itself. It would be nice, but I bet you'd be left writing your own sorting functions (or finding some prewritten ones on the Web).

Instead of using an iframe you could put the heading-table on it's own page, like a table of contents, and link to a genaric script, passing the record's primary key in the querystring, that displays a single item's information at a time or; if the average item has relatively little information, link to an anchor target on a paged list of content. Using the count of records in the database, determine which page each item would appear on (using the number of items displayed on a page and the total count) and embed a variable in the querystring like page=x in the linked address so when you load the generic script (php), it would load the xth page of data. For example:

SELECT * FROM MyTable LIMIT 0, 20;

I'm not entirely sure on the SQL or the DBMS you are using so you'll have to look put the syntax appropriate to your tools. I believe that says return all columns from MyTable beginning at record 0 (the first one) and only return 20 rows. The next page might (guessing) look like this:

SELECT * FROM MyTable LIMIT 20, 20;

Then, the address for the item whose primary key was 23 and was displayed on page 2 might look like this (assuming localhost was instead your domain name/IP address):

http://localhost.com/item.php?id=23&page=2

These are my ideas. It might complicate things paging via unique sorting mechanisms because you would likely want the item.php page sorted the same way as your table of contents, which would alter the page a particular item was displayed on and the order the items were displayed on that page. Since the table of contents is separated from the main data it wouldn't be a problem regenerating the data, and therefore, recalculating this information whenever the sorting techique is changed. Then pass that as well via the querystring, for example:

http://localhost.com/item.php?id=23&page=2&sort=2
OR
http://localhost.com/item.php?id=23&page=2&sort=name

I would generally stay away from frames because they don't flow nicely with Web browsers, being that each frame can refresh separately, etc. It's inconsistent and a frustrating experience for the user trying to navigate, IMHO.

I wouldn't shy away from using tables to layout your Web pages though. Browser wars are bad enough on PCs, let alone trying to make your site compatible with portable devices, etc. If your page is professional and has the intent of marketing your skills or is used for commercial purposes, target your sites compatability for the most exposure possible. Otherwise, target your intended audience or provide general browser support (IE/Firefox). Web development tools are poorly designed and inconsistently supported.

Personally, I hate today's Web languages and as a single example want to replace everything SGML based with something more programmer-friendly. I'm no fan of <anything that="looks" like="this" />. I am devising a replacement for Web development that I can only describe as an extensible, byte-coded, C-like language with explicitly defined static-typing, manual memory management (and out of scope backup garbage collection), and graphical concepts derived from full fledged 2D/3D graphic libraries, as well as Flash... It would be rendered in a single official 'browser' , or by a virtual machine or run-time. It would need a standard framework for defining common Web/GUI controls, graphical elements, and animation concepts; as well as for data management and access. From there you could extend it as required, and possibly implement binary libary concepts, etc. There would hopefully be an official IDE designed for it's development with graphical support and debugging, as well as optimizers, and automatically tracked application versioning for update management and ultimately, when you 'installed' an application the client's browser, virtual machine, or run-time would compile it natively for better performance...

Don't hold your breath. ;)

(Sorry for expressing that off-topic idea)

(I don't have time to revise this so hopefully it's not too confusingly written)

Tobias Dammers
Quote:

Personally, I hate today's Web languages and as a single example want to replace everything SGML based with something more programmer-friendly. I'm no fan of <anything that="looks" like="this" />. I am devising a replacement for Web development that I can only describe as an extensible, byte-coded, C-like language with explicitly defined static-typing, manual memory management (and out of scope backup garbage collection), and graphical concepts derived from full fledged 2D/3D graphic libraries, as well as Flash... It would be rendered in a single official 'browser' , or by a virtual machine or run-time. It would need a standard framework for defining common Web/GUI controls, graphical elements, and animation concepts; as well as for data management and access. From there you could extend it as required, and possibly implement binary libary concepts, etc. There would hopefully be an official IDE designed for it's development with graphical support and debugging, as well as optimizers, and automatically tracked application versioning for update management and ultimately, when you 'installed' an application the client's browser, virtual machine, or run-time would compile it natively for better performance...

You mean, the worst of all common programming languages and web technologies, combined into one massive package? Good idea.

Quote:

I wonder how JavaScript would perform sorting the data itself. It would be nice, but I bet you'd be left writing your own sorting functions (or finding some prewritten ones on the Web).

Took me 10 seconds to google this.
Javascript performance, of course, hugely depends on the client machine; since Array.sort() is a core language feature, I'd expect most implementations to use fairly efficient code. Unless the resulting list is very long, say >1000 rows, I guess sorting on the client is worth a shot. OTOH, sorting on the client requires downloading the entire list before displaying it for the first time, which may be an obstacle for large SQL results.
In other words: If your list is short, sort on the client (Javascript), if it's not, or the client doesn't have Javascript enabled, sort on the server. And of course profile.

Quote:

I wouldn't shy away from using tables to layout your Web pages though. Browser wars are bad enough on PCs, let alone trying to make your site compatible with portable devices, etc. If your page is professional and has the intent of marketing your skills or is used for commercial purposes, target your sites compatability for the most exposure possible. Otherwise, target your intended audience or provide general browser support (IE/Firefox). Web development tools are poorly designed and inconsistently supported.

IE != general browser support.
For browsers that support CSS, you have powerful tools to format your site in a reliable way, without resorting to tables. Browsers that don't support CSS are unlikely to provide any useful formatting at all, so those should just display the raw document structure. If something is in a table that isn't supposed to be, especially aural and tactile devices can produce confusing output.
Read the official specs for all the tools & technologies you use (PHP, HTML, Javascript, CSS), and adhere to them. Avoid features that are broken or missing in popular browsers. Test on as many browsers as you can. Design your page so that it still works with the smallest possible subset of HTML; you may want to test it on Lynx, Links, ELinks, or your mobile phone.
If it's a commercial site, and your audience consists mainly of digitally challenged people, then you might want to work around the flaws IE has, just so they don't complain - but when you do, please don't violate the existing web standards.

Mark Oates

php good.

dynamically generated webpages good.

CGamesPlay
Quote:

Personally, I hate today's Web languages and as a single example want to replace everything SGML based with something more programmer-friendly. I'm no fan of <anything that="looks" like="this" />. I am devising a replacement for Web development that I can only describe as an extensible, byte-coded, C-like language with explicitly defined static-typing, manual memory management (and out of scope backup garbage collection), and graphical concepts derived from full fledged 2D/3D graphic libraries, as well as Flash... It would be rendered in a single official 'browser' , or by a virtual machine or run-time. It would need a standard framework for defining common Web/GUI controls, graphical elements, and animation concepts; as well as for data management and access. From there you could extend it as required, and possibly implement binary libary concepts, etc. There would hopefully be an official IDE designed for it's development with graphical support and debugging, as well as optimizers, and automatically tracked application versioning for update management and ultimately, when you 'installed' an application the client's browser, virtual machine, or run-time would compile it natively for better performance...

Haha! ;D Buddy, it's Active X!

[edit]
Ooh, I like the RO‌FL -> ;D transliteration :)

bamccaig
Tobias Dammers said:

You mean, the worst of all common programming languages and web technologies, combined into one massive package? Good idea.

What did I mention that you consider bad to have in a development package? I don't claim to know enough to develop it. I just dream of something powerful and done right. The definition is constantly evolving.

Tobias Dammers said:

Javascript performance, of course, hugely depends on the client machine; since Array.sort() is a core language feature, I'd expect most implementations to use fairly efficient code.

I guess I wasn't trying very hard. Developing in JavaScript on a regular basis I've learned not to get my hopes up.

Besides, Array.sort() appears to sort a single Array (which is like a single column). I don't have time to look very hard (I'm at work), but http://w3schools.com doesn't seem to say anything about sorting an entire table of data. In other words, storing a table worth of information in JavaScript (however you go about it) and trying to sort it all based on a single column doesn't seem easy. Again, I'm not able to spend much time looking though.

http://w3schools.com also say that sorting is done alphabetically by default so you have to create a function to sort by numbers (let alone dates, etc.). Again, I don't have time right now to figure it out (and it's JavaScript so I'm not all that excited about it anyway).

Tobias Dammers said:

IE != general browser support.

I didn't mean that IE followed the standards. I meant that IE is one of the most popular browsers.

Currently, on Allegro.cc 42% of users are running Firefox and 40% of users are running IE. The next runner up is Opera with 6%. These figures are according to A.cc. I don't know how that detection is implemented and can't guarantee it's accuracy. Still, I would expect similar results in the average user base. And the farther away from technical people and the closer your audience gets to Windows the use of IE should increase.

I usually use IE in Windows and Firefox in Linux. I like them both and hate Web browsers in general.

Tobias Dammers
Quote:

What did I mention that you consider bad to have in a development package?

Let me elaborate:
extensible - that's a good thing.
byte-coded - as in "not human readable"? Remember, obfuscation is not encryption. Current web languages (PHP, HTML, JS) are already fairly efficient to parse.
C-like language - Nooooooo! C is great for kernel and driver programming, but it is not The Tool For The Job for web applications. You being used to it doesn't mean it's the best language for everything.
explicitly defined static-typing - You don't really need that for web stuff. 90% of your data is strings, and everything will eventually be displayed as a string; dynamic typing is nothing more than convenient. The only reason C and C++ have it is that it allows for some performance optimization at compile-time. This doesn't make any sense for an interpreted language, though.
manual memory management - You really want to inherit the number 1 source of errors, exploits, and crashes from C?
and out of scope backup garbage collection - Automatic GC has issues of its own, but most web languages have quite fine implementations already. Using auto-GC together with manual memory management is bound to make things slower and buggier.
graphical concepts derived from full fledged 2D/3D graphic libraries, as well as Flash... - We already have that, and it's being over-used all the time.
It would be rendered in a single official 'browser' - Who is going to write this whole new browser for all the platforms (not just windows and linux and macos, but also palmtops, cellphones, aural and tactile devices, some of the more obscure OSes...) out there? You?
or by a virtual machine - One of the things that bug me with Java. Yet another thing that sits there and eats system resources.
It would need a standard framework for defining common Web/GUI controls, - What, HTML <FORM> not good enough for you?
graphical elements - <IMG>?
animation concepts; - <OBJECT>? Flash? Animated GIF if you have to?
for data management and access. - SQL? PHP filesystem functions?
From there you could extend it as required, and possibly implement binary libary concepts, etc. - PHP can call pretty much everything the shell can...
There would hopefully be an official IDE - Just one? And that would be a 10 GB download, and require a Core 7 CPU and 15 TB of RAM?
graphical support and debugging, - Firefox has all that built-in, duh
automatically tracked application versioning for update management - CVS?
and ultimately, when you 'installed' an application I take great offense at web sites trying to "install" anything on my machine. Did you know that a script runs on the browser without installing anything at all? ::)
would compile it natively for better performance... - That's called JIT compiling, and Java already does that. Also, scripting languages generally come with a lot of features built-in, and those are very likely to be optimized for the given platform (e.g. PHP's array sorting functions). BTW, the main performance bottleneck for most web sites is still the network bandwidth.

All those things create this image in my mind of a huge, bloated, slow, unresponsive, useless blob occupying half my HDD just so I can view your site. No thank you.

le_y_mistar

tables are good. php is a good RAD tool

It comes down to if you can write good code to generate clean tables.

Tobias Dammers
Quote:

I usually use IE in Windows and Firefox in Linux. I like them both and hate Web browsers in general.

What's to like about IE? OK, it starts up a little faster than FF or Opera, but that's about it.

Quote:

Besides, Array.sort() appears to sort a single Array (which is like a single column). I don't have time to look very hard (I'm at work), but http://w3schools.com doesn't seem to say anything about sorting an entire table of data. In other words, storing a table worth of information in JavaScript (however you go about it) and trying to sort it all based on a single column doesn't seem easy. Again, I'm not able to spend much time looking though.

http://w3schools.com also say that sorting is done alphabetically by default so you have to create a function to sort by numbers (let alone dates, etc.). Again, I don't have time right now to figure it out (and it's JavaScript so I'm not all that excited about it anyway).

Well, Javascript is "the" web scripting language, and if you don't like it, there's little you can do. You can't really feasibly write web pages in anything but HTML / XHTML, and you can't feasibly provide client-side scripts in anything but Javascript (unless you like to support ActiveX, in which case this conversation is over).
Anyway; I'd use an array of arrays, and provide a custom compare function to pass to sort(). There could be a global telling the custom comparer by which column to sort.
But in fact, I'd really just sort server-side and see if that works feasibly (for my own site, it does).

Quote:

tables are good. php is a good RAD tool

Yes. No matter what Billy Boy is trying to teach us.

Inphernic

Table sorting works well/fast enough to be considered for small datasets (20-50 records or so should be reasonable when considering 'any' client machine). For big datasets, page regeneration is a better option. Considering you are listing games, I'd say you're going with the small dataset scenario.. unless you plan on making 50+ versions of Toggles.

Quote:

php is a good RAD tool

what

Tobias Dammers

Since you have to code the page regeneration scenario anyway to support clients without javascript, I'd say try that first and see if the result is acceptable (in terms of execution speed and server load).

Quote:

what

Either this or that.

Inphernic
Quote:

Either this [en.wikipedia.org] or that [rad.org.uk].

I'd say the latter, considering PHP itself isn't a RAD tool.

Tobias Dammers

Not explicitly, no.
It does allow for rather rapid application development though... ::)
And it's not really a dance development tool either...

Onewing
Quote:

Considering you are listing games, I'd say you're going with the small dataset scenario.. unless you plan on making 50+ versions of Toggles.

Good glory, don't let me get away with doing something like that. Although, I am revamping it to 2.0 with some major changes to the game mechanics (as an attempt to see if I've increased the "fun factor" of the game, something that's more difficult than optimizing and/or producing efficient algorithms).

Anyway, I'm using the table-built-by-php method for several different things on the site. One, the listing of games I've worked on (which is about 20, only about 3 of which have made it through the beta stages). Two, a more detailed leader board of the top 100 highscores from Toggles (an early version of that is here and was only about ten minutes of work, obviously you can see I stole a template from OSWD). Third, a site for Invictis that I mentioned a while back and for the "cards" of the game, which is going to be a very large number, plus it will have the images for the card (FuriousOrange has made some very impressive work for this and I've been promising him a site showcasing it for forever).

Thanks to all for your knowledge. Hopefully I will use it wisely. ;)

Ron Ofir
Quote:

obviously you can see I stole a template from OSWD

You can't steal templates from OSWD, that's what it's for! Though you could have spent one more minute to erase all irrelevant stuff.

Onewing
Quote:

You can't steal templates from OSWD, that's what it's for!

:-X;D

Quote:

Though you could have spent one more minute to erase all irrelevant stuff.

Actually, it would have only taken a second. But I only had five minutes, not five minutes and one second! :-/

Inphernic
Quote:

It does allow for rather rapid application development though...

Nah, not really. Sure, one simple site and/or garbage is fast and easy to write, but it's not that 'rapid' when you are doing something big/serious. There's something interesting on the way though when it comes to PHP..!

Quote:

You can't steal templates from OSWD, that's what it's for!

There is a difference between 1) taking a template + attributing the actual author properly and 2) taking a template + not attributing the actual author but throwing a "CIOYRUGHT BY RON OFFIR BEST WEBS DESINGERS EVAR!?? BTW NEOPETS ROCXXXX" on it instead.

Ron Ofir

Yup, but he did attribute the actual author properly. Anyway, Ofir is with one F!!!! AND MYSPACE PWNS NEOPETS!!!! LOLOL OMGFGFGFGFG111:P

Inphernic
Quote:

Yup, but he did attribute the actual author properly.

Yes - after he got caught. :P

Tobias Dammers
Quote:

Nah, not really. Sure, one simple site and/or garbage is fast and easy to write, but it's not that 'rapid' when you are doing something big/serious.

Re-reading the wikipedia article, I guess PHP has absolutely nothing to do with that and you, Inphernic, are of course right.

Quote:

But I only had five minutes, not five minutes and one second!

What is this, "Ready, Steady, Code"?

Inphernic
Quote:

Re-reading the wikipedia article, I guess PHP has absolutely nothing to do with that and you, Inphernic, are of course right.

I use PHP on near-daily basis. You read Wikipedia articles about PHP. Damn, you obviously win! ::)

Ron Ofir
Quote:

Yes - after he got caught. :P

Is that so?
BTW, you make cool music! I wonder if you mind sharing the sheet so I could have a shot at playing some of the tunes? I will properly attribute you and not RON OFIR DA GRET3ST COMPOSERZ!!! pretty pretty please?

Inphernic
Quote:

Is that so?

Yes. Use thy search, ye unbeliever.

Quote:

BTW, you make cool music! I wonder if you mind sharing the sheet so I could have a shot at playing some of the tunes? I will properly attribute you and not RON OFIR DA GRET3ST COMPOSERZ!!! pretty pretty please?

What would you play them with; your mouth?

Onewing
Quote:

What is this, "Ready, Steady, Code"?

It's more like, "Ready, Code!" No time for steady. ;D

Quote:

Yes - after he got caught.

Did I do something wrong? My memory escapes me...

bamccaig
Tobias Dammers said:

byte-coded - as in "not human readable"? Remember, obfuscation is not encryption. Current web languages (PHP, HTML, JS) are already fairly efficient to parse

It wasn't intended to really hide the code. It was mostly designed for speed, which you can't deny would be improved with byte-codes. It was essentially a way to speed things up and still allow for platform compatability. I don't like scripts and wanted something closer to compiled code. Also, by 'compiling' first it would ensure that the application doesn't have syntax errors before the client gets it. With scripted langauges that is more of an option than a requirement.

Encryption would be an extra feature. There is a lot more to my ideas which are really hard to document, especially in a thread that's not even really about this.

Tobias Dammers said:

C-like language - Nooooooo! C is great for kernel and driver programming, but it is not The Tool For The Job for web applications. You being used to it doesn't mean it's the best language for everything.

C has very clean, logical syntax and property formatted code can be very programmer-readable. It's the nicest language I have ever used. It's not a language for dummies and computer programming (information management) is not for dummies.

VB .NET is nice as well, but I prefer C (or C++) syntax, which has more unique operators for things (i.e. VB .NET uses = in place of = and ==), as well as other minor preferences. There may be other langauges that I haven't used that could influence it, but I can't factor those in yet because I haven't used them. For now, I am sticking with C-like (considering it is more a dream or plan-in-progress than a proposal).

I want to take the Web Web programming* away from non-programmers so that we can attempt to eliminate (or at least limit) the problems with it. It's one thing to allow general users to embrace the Web. It's another thing when those general users are damaging the reputation of computing and information management.

Tobias Dammers said:

explicitly defined static-typing - You don't really need that for web stuff. 90% of your data is strings, and everything will eventually be displayed as a string; dynamic typing is nothing more than convenient. The only reason C and C++ have it is that it allows for some performance optimization at compile-time. This doesn't make any sense for an interpreted language, though.

There is no harm in defining data types. There is harm in not defining data types. That's why langauges that allow both encourage definitions. If you don't know what data type a particular variable is at run-time than you often need to check to make sure you're handling it correctly. I find this more frustrating than just defining variable data types. Perhaps a mid-ground of explicitly defined dynamic typing could be used instead. In other words, you change the type of a variable rather than converting and assigning it to another variable. For now, I prefer static-typing.

Tobias Dammers said:

manual memory management - You really want to inherit the number 1 source of errors, exploits, and crashes from C?

Well it all depends. It seems the best solution is to have the compiler figure out where memory allocated to the program is no longer used and release it. Somehow, it doesn't seem to be done well in other garbage collected languages. I also prefer the ability to say clean it up, even if the compiler will do it for me, just to be sure. What I envision is there being no difference: the compiler will code absolute clean up in the correct place and declaring 'delete x' is more of a good practice. Again, it's evolving as I learn more.

Tobias Dammers said:

and out of scope backup garbage collection - Automatic GC has issues of its own, but most web languages have quite fine implementations already. Using auto-GC together with manual memory management is bound to make things slower and buggier.

The resulted byte-code (and maybe eventually, binary executable) will release memory after the last reference is made, regardless of whether the programmer said to or not. Or if releasing memory is time consuming it could be an object only thing until memory actually goes out of scope. Nothing I'm saying is law, only ideas that I'm sure could be improved upon.

Since it's all a theoretical 'package', as you referred to it, I can say things like "it will" without hesitation. Understandably, successfully producing all of this stuff would be a buggy, slow process and version 1.0 would, unfortunately, not be perfect.

Tobias Dammers said:

graphical concepts derived from full fledged 2D/3D graphic libraries, as well as Flash... - We already have that, and it's being over-used all the time.

What exactly are you referring to here? I'm talking about routines to render graphics, both 2-dimensionally and 3-dimensionally, as well as create timelines for things. One top of that, a graphic studio for developing the graphics and remember the math involved in the drawing to save space. It could be configurable for the best result. If you need it to use little memory or network traffic, send the math. If you need it to happen fast then send the resulting data. Combinations could be used in a single application.

Tobias Dammers said:

It would be rendered in a single official 'browser' - Who is going to write this whole new browser for all the platforms (not just windows and linux and macos, but also palmtops, cellphones, aural and tactile devices, some of the more obscure OSes...) out there? You?

I'm not trying to say that I have the knowledge or experience to produce this. I wasn't proposing it as a now project. It's something I'm dreaming/thinking about. I was planning it as an open-source project, but again, having a single official browser/virtual-machine/run-time so the client doesn't have to deal with compatability issues; aside from having an up-to-date stable version installed.

Why let a million people interpret it how they think it should be and end up with a 'package' with no set rules and everybody adding unsupported extensions? That would result in code that was no longer portable and no longer easily supported.

Tobias Dammers said:

or by a virtual machine - One of the things that bug me with Java. Yet another thing that sits there and eats system resources.

I haven't defined what it will use yet because I don't have the technical background to make the best decision. It could be one or all of the above, depending on your application. In [my interpretation of] a perfect world, it would go through a final compilation process on the client and compile into a native binary (one time). The compiler that carries out the process would prevent code violating the laws of this 'language', but would produce a binary that executes on the client. Maybe something like Microsoft's .NET CLR could interpret it. I don't know how the CLR actually works so again I'm just speculating.

Besides, that, you seem to support scripted languages. They are interpretted at run time, which can't be much different from a virtual-machine or run-time. If anything, I would think that parsing code would be worse.

Tobias Dammers said:

It would need a standard framework for defining common Web/GUI controls, - What, HTML <FORM> not good enough for you?

Actually, no, HTML's <form> isn't good enough for me. HTML is a horrible way to do things and probably is only used today because the Web blew up quicker than a good solution could be made. HTML just kept being patched and extended, as well as Web browsers just extending what the Web was. If you've done any level of Web development you know that it's a mess and should be refactored.

Tobias Dammers said:

graphical elements - <IMG>?

Web elements don't have as much power as a programming language should give you.

Tobias Dammers said:

animation concepts; - <OBJECT>? Flash? Animated GIF if you have to?

Flash is a great tool, but having it built into this new concept would eliminate any conflicts and would also make integrating animations into applications a lot easier. It wouldn't have to be a floating object in the middle of your application. It would be part of your application sharing access to the same data, etc.

Tobias Dammers said:

for data management and access. - SQL? PHP filesystem functions?

Exactly, interfaces to database management systems. It would either have it's own filesystem routines (rather than relying on PHP for that functionality......) or if the native system could provide the functionality better than it would provide an interface for it.

Tobias Dammers said:

From there you could extend it as required, and possibly implement binary libary concepts, etc. - PHP can call pretty much everything the shell can...

I don't have as much of a problem with server-side Web programming as I do with client-side Web programming (which the server-side kind of relies on).

Tobias Dammers said:

There would hopefully be an official IDE - Just one? And that would be a 10 GB download, and require a Core 7 CPU and 15 TB of RAM?

One official one. Who better to provide a development environment than the design/development team? Again, it'll be open-source so anybody is free to do what they want - hopefully they don't branch off and create problems. If somebody didn't like how it was going and thought they could do better I wouldn't stop them. I would request that they changed the name to make it easier for users to keep track of which tools are compatible.

And why would it be a 10 GB download? Granted, all together it would probably be a few gigs in size (IDEs tend to grow rather large, for example), but in terms of executing it should be rather small - definitely NOT 10 GB. And you wouldn't need to have ALL of it to use it. Only what you need. Users wouldn't need development tools, etc.

Tobias Dammers said:

graphical support and debugging, - Firefox has all that built-in, duh

Firefox allows you to drag Web page controls and develop an application in a GUI environment? You need to tell me how cause I've been using stupid Dreamweaver! There are numerous debugging tools available for Web development, but because Web langauges are so dynamic across browsers and platforms it's difficult to provide a good development environment.

Tobias Dammers said:

automatically tracked application versioning for update management - CVS?

Sort of... I envision you downloading an application that handles a particular "site's" Web needs. The data changes, but unless a major update is developed the core application remains the same. As a result, the compiled version on the client doesn't change everytime you visit the site. As a result, you would 'install' applications by compiling them and having them registered and integrated with the 'run-time' or whatever. When a newer version was released, client-server communications would automatically send updates which would then be recompiled. The version control would be more for the client/user than for development, although the development tools should also keep versioning records for rolling-back, etc... Everything would have to be configurable for everybody's needs.

Tobias Dammers said:

and ultimately, when you 'installed' an application I take great offense at web sites trying to "install" anything on my machine. Did you know that a script runs on the browser without installing anything at all?

Install is used loosely. They would be integrated with the run-time and tracked. Removing them would be as simple as deleting an application's directory, which would be located in a subdirectory of whatever this animal ultimately is (and it's own directory is the only place an application has permission to access by default); however, an interface would be provided for doing this. All changes made would be logged and checkpointed.

Tobias Dammers said:

would compile it natively for better performance... - That's called JIT compiling, and Java already does that. Also, scripting languages generally come with a lot of features built-in, and those are very likely to be optimized for the given platform (e.g. PHP's array sorting functions). BTW, the main performance bottleneck for most web sites is still the network bandwidth.

And it would be up to the developers to decide how to keep the application reasonably-sized. If things are designed right, a full update wouldn't have to happen for weeks or months (or years) and only data would even need to be sent between client and server.

If changes were logged correctly updates could only contain changes and apply those to local copies to cut down on network traffic. The possibilities are endless.

You're welcome to come up with your perfect programming language/tools. I'd be interested in hearing what you think the solution is.

* Edited/Clarified on March 17, 2007 05:06 PM EST

Ron Ofir
Quote:

What would you play them with; your mouth?

That's called singing. Oh, and I am a somewhat competent guitar player.

Quote:

Did I do something wrong? My memory escapes me...

I'm trying to find out too...

bamccaig
Tobias Dammers said:

What's to like about IE? OK, it starts up a little faster than FF or Opera, but that's about it.

What's not to like about IE? I find it's very user-friendly and serves my needs as well as Firefox does. I'm using IE 7, which is definitely better than IE 6. The truth is that Web development is so messed up that it doesn't matter as much which browsers follow the W3C's specifications the closest because the SGML-based languages suck and the Web is poorly designed anyway.

*Edit* I haven't been spending much time in Firefox, but using it in Windows along side of IE you can definitely argue that is is better (although add ons, which I think COULD be written for IE, unbalance the competition)

The project I am working on right now is IE only so I don't have to worry about other browser compatability issues. It's still a nightmare, which is inherent from HTML, XHTML, and JavaScript (and SGML, for that matter).

I don't think that Firefox follows the specs completely either. And why don't common Web browsers ignore whitespace like they're supposed to?

Anybody that believes in formatted code is full of themselves for supporting SGML. View the source of a few random Web pages and tell me how maintainable you think the code is. I know that any language can be poorly formatted, but it doesn't help with so many redundant characters (<, >, ", ', /) and no rules for where things go or version usage.

(I'm impressed by the source behind A.cc - good work, Matthew :D)

Tobias Dammers said:

Well, Javascript is "the" web scripting language, and if you don't like it, there's little you can do. You can't really feasibly write web pages in anything but HTML / XHTML, and you can't feasibly provide client-side scripts in anything but Javascript (unless you like to support ActiveX, in which case this conversation is over).

Exactly why I hate Web programming, as it is today, and dream of a better Web.

CGamesPlay
Quote:

(I'm impressed by the source behind A.cc - good work, Matthew :D)

Technically, I think about none of the HTML on Allegro.cc is hand written. It's all the output from an XML parser. See this.

Quote:

And why don't common Web browsers ignore whitespace like they're supposed to?

Err, they do.

Quote:

I don't think that Firefox follows the specs completely either.

This is a known "issue", which is unresolved because completely following the specs breaks many websites. This is not a reflection on the standards. This is the result of browsers not supporting standards for long enough that many developers created applications which deviated from them.

Kibiz0r
Quote:

My question is, is building a table using PHP a good idea?

I'm not sure how structurally sound a table made from code would be.

bamccaig
CGamesPlay said:

Err, they do.

Not in my experience. I've had to remove whitespace to get things to format correctly, which shouldn't have to be done. Originally it was discovered in IE, but myself and a coworker tested it in Firefox and found the same result.

Kibiz0r said:

I'm not sure how structurally sound a table made from code would be.

Why wouldn't an HTML table generated with server-side code be structurally sound? You start the table off with a <table ...> tag and end it with a </table> tag. For every row of data you start off with a <tr ...> tag and end with a </tr> tag. For every column in that row, you start off with a <td ...> tag and end with a </td> tag. What you put in the cells should be mostly data, possibly enclosed in an anchor element or other element.

A great look is creating the look and feel of custom buttons with CSS. A coworker designed CSS to make <li>s enclosed in a particular class of <div>s look and act like buttons (which may or may not be a good application, but it works really well, looks good, and is easy to use).

You can hard code a structured header row for the table, and use a loop to generate the remaining rows. It not only works great, it's preferred to hard coding redundant code, such as the rows/data of a table.

Kibiz0r's sig said:

[17:08] Kibiz0r: <my street address>
[17:08] Kibiz0r: Do you need a pointer to the address?
[17:09] ajinx3: yeah
[17:09] Kibiz0r: 0x22ff09
[17:09] ajinx3: this better not crash my car

;D

Samuel Henderson
Quote:

I'm not sure how structurally sound a table made from code would be.

:D Haha! You said what was on my mind. You could always throw emergency comments at it for extra support...

Bamccaig said:

...

Pretty much your entire pipedream browser idea is gonna continue to get shot down here. Most people are fine with the solutions that are already in place, and redesigning and building a monolithic monster browser is like redesigning and building the wheel. It's easier to hack and piece what is already there together than it is to start all over and do it right (or wrong as the cases may be).

CGamesPlay
Quote:

I've had to remove whitespace to get things to format correctly, which shouldn't have to be done.

Yes. All consecutive strings of whitespace in an HTML document are collapsed down to a single space. It's well-defined. Yes, you do have to ensure that there are no whitespace characters between tags in some cases.

bamccaig

:-[

Inphernic
Quote:

Did I do something wrong? My memory escapes me...

Nah, you didn't. We are referring to BAF, although Ophir now seems to be pretending he doesn't know. Considering he's a BAF lackey, it makes sense though. 8-)

Ron Ofir

We were referring to BAF? What's a lackey anyway?

Oh, and:

Quote:

What would you play them with; your mouth?

That's called singing. Oh, and I am a somewhat competent guitar player.

BAF

And I rectified the problem once I was made aware of it. Thanks. 8-)

Inphernic
Quote:

We were referring to BAF?

Quote:

Quote:

You can't steal templates from OSWD, that's what it's for! Though you could have spent one more minute to erase all irrelevant stuff.

Quote:

Yup, but he did attribute the actual author properly.

Quote:

Is that so?

Then pray tell; who are you referring to?

Quote:

What's a lackey anyway?

gb2dictionary

Quote:

Quote:

I rectified the problem once I was made aware of it.

Quote:

I stole blatantly and then quickly attributed the author when I got caught.

Fix'd.

And because the old threads are funny, let us go into the future; all the way to the year 2000:

Ron Ofir
Quote:

Then pray tell; who are you referring to?

Well, I thought we were talking about Onewing. At least, I was.

Quote:

gb2dictionary

I'm afraid I'm not familiar of this term. And google came up with nothing useful.

Oh, and you still haven't answered me.

BAF

Wheee I just got back from my spaceship ride, thanks Inphernic.

Inphernic said:

[quote BAF]
I rectified the problem once I was made aware of it.

Inphernic said:

I stole blatantly and then quickly attributed the author when I got caught.

Fix'd.
</quote>

Thanks for clarifying that for me too.

[edit]
Added attribution to the above quotes.

Inphernic
Quote:

Well, I thought we were talking about Onewing. At least, I was.

"OK"

Quote:

I'm afraid I'm not familiar of this term. And google came up with nothing useful.

Lurk more.

Quote:

Oh, and you still haven't answered me.

Is that so?

Quote:

Wheee I just got back from my spaceship ride, thanks Inphernic.

Any time!

Quote:

Added attribution to the above quotes.

Too bad you can't edit the old posts in those threads, eh?

Ron Ofir
Quote:

Is that so?

Yes it is. As a reminder:

Quote:

[quote2]
What would you play them with; your mouth?
[/quote2]
That's called singing. Oh, and I am a somewhat competent guitar player.

Thomas Fjellstrom
Ron Ophir said:

Oh, and you still haven't answered me.

He doesn't tend to do anything that isn't flaming or insulting.

Sporus
bamccaig said:

I want to take the Web away from non-programmers

For this, I hate you. :'(

BAF

I want to take the Web away from bamccaig. And his car. :-/

X-G

I want to take his Web made of diamond at 400 cars per away into a wall.

Samuel Henderson
Quote:

I want to take the Web away from bamccaig. And his car

Nahh... Bammcaig is a good guy. You definitely do not want his car... ;)

BAF

Err, what?

bamccaig

Maybe it'll help to clarify (maybe not): I meant I want to take Web programming away from non-programmers...

:-[

Samuel Henderson

I know Bammcaig in real life. He goes to my college. He gives me rides to work on mondays. His car is nothing special (more of a beater TBH).

Sorry Bam!

BAF

The err, what was aimed at X-G, you just got in my way of posting. ;)

Samuel Henderson

Ahh. Sorry Baf. I was wondering what X-G meant as well.

Inphernic
Quote:

He doesn't tend to do anything that isn't flaming or insulting.

You get what you order, sweetiepie. :)

Matthew Leverton
Quote:

You get what you order, sweetiepie. :)

More like you can only deliver what you have in stock.

CGamesPlay

Inphernic reminds me of Gollum. He does good in Depot threads; those are like his "precious". But anything else and he is evil and mean and needs to be pulled around by a rope around the neck by some short people.

X-G

Bloody hell, Inphy. Are you trying to horn in on my gig?

Inphernic
Quote:

More like you can only deliver what you have in stock.

Quote:

Inphernic reminds me of Gollum. He does good in Depot threads; those are like his "precious". But anything else and he is evil and mean and needs to be pulled around by a rope around the neck by some short people.

Nice ones. ;D

Ok, so out of the recent threads, this one got extra jalapeƱo (on the house, mind you). The car thread has just one comment. Then there was the recent religion thread(s are go-go) which I think stayed fairly civilized in the end (well, as civilized as you can get with those people ;)). The order history has more but relatively speaking I'm not that trigger-happy, am I?

At any rate, kittens aren't out of stock:

http://www.duckiehorde.net/kitten.jpg

Quote:

Bloody hell, Inphy. Are you trying to horn in on my gig?

You know what they say about challengers.

Mark Oates

awww!!!! ;D;D

X-G
Quote:

You know what they say about challengers.

They always appear. I guess there's only one thing to do in a situation like this; party hard.

591626

Inphernic

I concede.

http://www.duckiehorde.net/ph.gif

Tobias Dammers

Talking about a derailed thread...

Thread #590571. Printed from Allegro.cc