Jump to content

Archived

This topic is now archived and is closed to further replies.

Ninjakreborn

Largest amount of programming on one page

Recommended Posts

I have noticed when programming in general, a lot of the pages end up being well over 500+ lines of programming.  I ended up programming this one page
http://www.thecampussource.com/view.php
The most I ever had on one page was 875 lines of pure programming, and after I am done, it'll be well over 1000.  I have it handling a lot of different stuff from a lot of different pages.  What is the most amount of programming lines you ever had on one page before.

Share this post


Link to post
Share on other sites
ok, i'll bite, although, the most amount of code per page sometimes volunteers you for the most disorganized code as well sometimes ;) . once i have a page that reaches the 1000 line mark, i seriously start looking for duplicate code and ways to extract function calls or OOP into their own structured files. my average files usually end up being around the 400-500 line mark. i'd have to say my biggest so far, though was in the neighborhood of 3,500 lines.

here's the catch, though: when i went back a year later and rewrote the code, i extracted the pieces into three separate files that ran a grand total of just over 2,000 combined. so... you do the math :P

Share this post


Link to post
Share on other sites
One of my pages for an AJAX backend was over 1400 lines.

Share this post


Link to post
Share on other sites
My average line count is also around the 500 mark per file, but the largest file of mine so far is around 1500 lines which is in a project I am currently working on, the file is pretty much complete though.

Share this post


Link to post
Share on other sites
businessman, keep in mind that it is just PHP.  The JS part came from a variety of js files.  It was basically just a bunch of functions (28 if I recall correctly) that I called from a TON of different locations within a piece of my application suite.

Damn I miss that job :(

Share this post


Link to post
Share on other sites
at my place of employment, our systems take PHP's OOP functionality to a level that is almost pushing the boundaries, so my/our files tend to stay under 400 lines. The average class is about 200 lines. But then again, we have 2,486 PHP files in our system's tree, 172 XML files, and 1166 .tpl files, so it adds up to a rather substantial amount of typing.

The commands I used to determine this:
[code]
$ ls -R ./* | grep '.php' | wc -l
$ ls -R ./* | grep '.xml' | wc -l
$ ls -R ./* | grep '.tpl' | wc -l[/code]

Share this post


Link to post
Share on other sites
[quote author=businessman332211 link=topic=108966.msg438965#msg438965 date=1158869912]
I would be amazed to see 1400 lines of ajax programming, that must have been quite a project.
[/quote]

There is no such thing as AJAX programming. The programming/scripting in AJAX is just JavaScript. AJAX is when you use XMLHttpRequest in JavaScript.

Share this post


Link to post
Share on other sites
I know, but with me, what I consider ajax programming, is anything that you are actively putting together the proper elements to get the concept of ajax.

Share this post


Link to post
Share on other sites
[quote author=Daniel0 link=topic=108966.msg439176#msg439176 date=1158903689]
[quote author=businessman332211 link=topic=108966.msg438965#msg438965 date=1158869912]
I would be amazed to see 1400 lines of ajax programming, that must have been quite a project.
[/quote]

There is no such thing as AJAX programming. The programming/scripting in AJAX is just JavaScript. AJAX is when you use XMLHttpRequest in JavaScript.
[/quote]

I would have to disagree with that. AJAX isn't a programming language, but neither is "OOP" - AJAX, like OOP, is a term to describe the technology or methods/techniques used to create a program. I'd say "AJAX programming" is a perfectly valid term.

[b]Edit:[/b] I suppose, though, the term I should use is "OO programming"... or else it would expand to "Object Oriented Programming programming". And that's no good.

Share this post


Link to post
Share on other sites
[quote author=businessman332211 link=topic=108966.msg439334#msg439334 date=1158927686]
I know, but with me, what I consider ajax programming, is anything that you are actively putting together the proper elements to get the concept of ajax.
[/quote]

In that case, why is this on your website :

[quote=www.freelancebusinessman.com]Ajax - (I have been studying this language since it's creation)[/quote]

Share this post


Link to post
Share on other sites
[url=http://en.wikipedia.org/wiki/AJAX_%28programming%29]http://en.wikipedia.org/wiki/AJAX_%28programming%29[/url]
Just because I carry that opinion doesn't mean I don't know how to do it.  Also just because I don't use ajax all the time doesn't mean that I don't know how to do it.  I started looking up ajax quite a long time ago.  Which would be about 8 months, it's been out since 2005, so maybe not since it's creation I think I need to change that.  I guess your right, I shouldn't have put since it's creation, that doesn't really match the truth, it was more of about 6-8 months ago, it wasn't long after it came out, but I still need to specify that.  However about teh term Ajax, if I did ajax as a concept, then it's just putting multiple languages together, but I get annoyed when I hear terms like AHAH, asynchronious html, and http.  Or other like terms, because I feel that ajax itself is a very special form of programming, it is very powerful, but when they come up with all these otehr terms, ajax itself starts loosing it's powerful philisophically as a language.  I feel it's a very good term to use "programming language" with javascript because of it's nature.  WIthout the proper elements it doesn't work, and it's not called ajax. 

Share this post


Link to post
Share on other sites
Maybe we should clarify the "creation" of AJAX..... which was actually several years ago.  The technologies that make up "AJAX programming" have existed for quite some time.  The fact that browsers only recently started supporting some of the methods is an entirely different subject.  If you truly wanted to talk about the creation of AJAX-type applications, you'd have to go back to the creation of XML and JS... which is WAAAAAAAY before 2005.

Share this post


Link to post
Share on other sites
[quote author=businessman332211 link=topic=108966.msg440933#msg440933 date=1159194251]
Just because I carry that opinion doesn't mean I don't know how to do it.  Also just because I don't use ajax all the time doesn't mean that I don't know how to do it.... I feel it's a very good term to use "programming language" with javascript because of it's nature.  WIthout the proper elements it doesn't work, and it's not called ajax. 
[/quote]
wow. he wasn't even attacking your knowledge of the subject at all. he simply questioned why you used the term [i]programming language[/i] to refer to AJAX on your site, but then above you said you know there is no such thing as AJAX programming. no question of your knowledge was implied, it's just inconsistencies like that that can really damage your credibility.

also, keep in mind that technically speaking, javascript is not a programming language at all, but a client side scripting language. if you want to get really technical, you could even argue that PHP is not a programming language, but rather a server side scripting language, too... but that one is up for debate ;) ... suffice to say, most of the time, people really aren't going to care whether or not a coder [i]feels it is a good term[/i] or representation of a technology, but rather be sure you are using terms and descriptions that are widely accepted.

Share this post


Link to post
Share on other sites
[quote author=ober link=topic=108966.msg440946#msg440946 date=1159194549]
If you truly wanted to talk about the creation of AJAX-type applications, you'd have to go back to the creation of XML and JS... which is WAAAAAAAY before 2005.
[/quote]

bingo... hence the coined name AJAX (Asynchronous JavaScript and [b]XML[/b]).

Share this post


Link to post
Share on other sites
[quote]
Also just because I don't use ajax all the time doesn't mean that I don't know how to do it
[/quote]
sounds like the husband justifying to the wife why the toilet is still dirty...

I have some thoughts of my own on terminology (although i'm concious that this has gone WAY off topic).
Terminology, with regards to programming is generally used for one of the following reasons:
1, to make a coder sound knowledgable.
2, to make the coder sound better than another coder
3, to join the "Web 2.0 bandwagon" (or anything else that's "in" at the moment)
4, to make ones intentions clear to another, by using a generic "language".

so if none of the above really apply, then the terminology is somewhat irrelevent - especially as the final consideration comes down to [b]results[/b], not what stuff goes on in the background. The average end user couldnt care less as long as they have a nice, easy browsing experience.

AJAX is one of these things that (whilst i like it and clearly can see the benefits) is one of those buzzwords that seem to get used as a 'knowledge benchmark' - "you don't know AJAX? you must be rubbish then!!!!" or "wow!!! you know AJAX!!! you are god!!!"  (trust me, look around on certain forums and you WILL see these type of comments) - my question is though - before AJAX was widely introduced, did that mean coders that werent using it were rubbish?
didn't think so.

so after all that waffle by myself, my point is that it really doesn't matter whether it's AJAX Coding/AJAX programming/AJAX toilet cleaning/AHAH/AIAWOT.

back on to the original point - my files are generally as big as they need to be. I never really get to worried about the size of my pages, as long as it does the job effectively. however, sometimes if a page gets HUGE, i will make a point of putting a kind of index at the top of the file just so as I know exactly whats in there without hunting things down. most of the time i'll do that anyway.

Cheers
Mark

Share this post


Link to post
Share on other sites
[quote author=obsidian link=topic=108966.msg440953#msg440953 date=1159194895]
suffice to say, most of the time, people really aren't going to care whether or not a coder [i]feels it is a good term[/i] or representation of a technology, but rather be sure you are using terms and descriptions that are widely accepted.
[/quote]
obsidian, if i'd have read this bit properly, i wouldnt have waffled on for ages lol

still, point well made

Share this post


Link to post
Share on other sites
No, I never get offended with anything barand says, he has helped me so many times, I always love hearing his suggestions, I was just saying, I would never get offended by anything he said with how many times he helped me.  As for programming, yes javascript I would consider a scripting language, but if you look at some major javascript applications, it can get really heavy after awhile. Some javascript programming can be harder for me than php programming, and I have done javascript for longer than php. 
I thought ajax came out in 2005, if that's the case, when I update my site I will update that with the time period, when i first started with ajax, the first place I checked was wikipedia, it said 2005, since then I stated since it's creation, I am going to change that on the next website change. 
as what redbullmarky is saying, I don't really know anythign at all about web 2.0 itself because everything I look at web 2.0 it seems affiliated with .net and asp, and i don't like those languages much, I see ajax associated with web 2.0 but the thing with that, is it always seems to be associated with .net as well.

Share this post


Link to post
Share on other sites
I don't believe you could in no possible way be offended by anything he might say.

Share this post


Link to post
Share on other sites
[quote author=ober link=topic=108966.msg441014#msg441014 date=1159199304]
I think my head hurts.
[/quote]

oof. You said it.

Share this post


Link to post
Share on other sites
I was merely calling into question Businessman's reference to AJAX as a [b]language[/b] on his site.

But I love it when I throw a pebble in the pond and those ripples keep on going.

Share this post


Link to post
Share on other sites
PS this article on XMLHTTP dates back to 2002

http://www.jibbering.com/2002/4/httprequest.2002.html

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.