Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Table Built from PHP

Credits go to mEmO, BAF, bamccaig, CGamesPlay, Crazy Photon, Inphernic, le_y_mistar, Mark Oates, Tobias Dammers, and X-G for helping out!
This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
Table Built from PHP
Tobias Dammers
Member #2,604
August 2002
avatar

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"?

---
Me make music: Triofobie
---
"We need Tobias and his awesome trombone, too." - Johan Halmén

Inphernic
Member #1,111
March 2001

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
Member #2,357
May 2002
avatar

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
Member #1,111
March 2001

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
Member #6,152
August 2005
avatar

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...

------------
Solo-Games.org | My Tech Blog: The Digital Helm

bamccaig
Member #7,536
July 2006
avatar

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
Member #2,357
May 2002
avatar

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
Member #7,536
July 2006
avatar

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
Member #2,559
July 2002
avatar

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.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Kibiz0r
Member #6,203
September 2005
avatar

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
Member #7,536
July 2006
avatar

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
Member #3,757
August 2003
avatar

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).

=================================================
Paul whoknows: Why is this thread still open?
Onewing: Because it is a pthread: a thread for me to pee on.

CGamesPlay
Member #2,559
July 2002
avatar

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.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

bamccaig
Member #7,536
July 2006
avatar

Inphernic
Member #1,111
March 2001

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
Member #2,357
May 2002
avatar

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
Member #2,981
December 2002
avatar

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

Inphernic
Member #1,111
March 2001

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
Member #2,357
May 2002
avatar

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
Member #2,981
December 2002
avatar

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
Member #1,111
March 2001

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
Member #2,357
May 2002
avatar

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
Member #476
June 2000
avatar

Ron Ophir said:

Oh, and you still haven't answered me.

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

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Sporus
Member #3,815
August 2003
avatar

bamccaig said:

I want to take the Web away from non-programmers

For this, I hate you. :'(

BAF
Member #2,981
December 2002
avatar

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

 1   2   3 


Go to: