1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

jsonViewer works again

Discussion in 'JavaScript' started by seductiveapps.com, Jan 19, 2018.

  1. #1

    Attached Files:

    seductiveapps.com, Jan 19, 2018 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,487
    Likes Received:
    4,456
    Best Answers:
    123
    Trophy Points:
    665
    #2
    What's your question?
     
    sarahk, Jan 20, 2018 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #3
    He's not asking a question, he's just sharing the code he created -- that takes close to a minute and a half to even load here, has some stupid "loading" screen garbage, and that I honestly still can't tell what in blazes it is even supposed to be doing... apart from the fact that whatever it is, that's not how you do it.

    See outdated outmoded inaccessible broken nonsense like:
    
    <li><a class="noPushState" href="javascript:sa.backgrounds.next('#siteBackground', seductiveapps.site.themes.groups.guests.calculate.stages[0].backgrounds.favorites.onlyVideoHD, 'vacation');">Vacations</a></li>
    
    Code (markup):
    Or just plain outright and complete ignorance of how to even use HTML properly such as:
    
    						<form>
    							<table style="width:270px;padding-left:10px;">
    								<tr>
    									<td colspan="2">
    										<span style="font-size:9px; color:red;background:white;">
    										Comments can only be removed by the IP address they were posted from..
    										</span>
    									</td>
    								</tr>
    								<tr>
    									<td>From : </td>
    									<td><input id="newCommentFrom" name="newCommentFrom" style="width:100%;"/></td>
    								</tr>
    								<tr><td colspan="2">
    									<textarea id="newComment" name="newComment" style="width:395px; height:300px;"> </textarea>
    								</td></tr>
    							</table>
    							<table>
    								<tr><td style="width:20px">&nbsp;</td><td>
    									<div id="newCommentSubmit" class="vividButton vividTheme__menu_002"><a href="javascript:sa.s.c.enterNewComment();">Make Comment</a></div>
    								</td><td>
    									<div id="cancelCommentSubmit" class="vividButton vividTheme__menu_002"><a href="javascript:sa.s.c.hideCommentsEditor();">Cancel</a></div>
    								</td></tr>
    							</table>
    						</form>
    
    Code (markup):
    1997 called, even it didn't like your tables for layout and broken inaccessible incomplete form.

    Since if every anchor (or most anchors) are getting the same class none of them should have classes, href="javascript:" doesn't even EXIST if you deploy your site under the content security policy due to being a safety risk, and of course if the element only works for JavaScript it should 1) be a button not an anchor, 2) be added by the scripting since it does jack scripting off, and 3) have the EVENT added by the scripting too.

    But what can one expect from a page that wastes 13 megabytes in 168 separate files on showing what I think is a json dissection (what should be under 1k of code) or something that turns a JSON structure into a webiste (around 4k's job) and a background image with dick-all actually working on the page. See how here what I'm getting doesn't even remotely resemble his (nearly impossible to see) thumbnail.
    http://www.cutcodedown.com/for_others/seductiveApps/images/nothing.jpg

    Since again, it's just another broken bloated train wreck of how NOT to build a website.

    Seriously man, if you're gonna keep trying to build website stuff, back the f*** away from the JavaScript and learn to use HTML/CSS properly FIRST! It's clear you've never even TRIED to grasp the most basic of the concepts of either -- much less considered that NO legitimate user is going to wait for one of your multi-megabyte disasters to even load.
     
    deathshadow, Jan 21, 2018 IP
  4. seductiveapps.com

    seductiveapps.com Active Member

    Messages:
    200
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #4
    sarahk:

    it's not a question, it's an announcement of a free product that others can use.

    deathshadow:

    if you didn't have useful advice sometimes, i'd treat you like the troll that you are :p
    with your kinda attitude, i feel no need to defend my software efforts at all.
    but i do want to say this : you got the CSS-only blinders on REAL tight. :p
     
    Last edited: Jan 22, 2018
    seductiveapps.com, Jan 22, 2018 IP
  5. seductiveapps.com

    seductiveapps.com Active Member

    Messages:
    200
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #5
    and eh, while writing the more complicated scripts, you'd best stick to a policy of making it work in 1 browser (Chrome, in my case) *first*, and *then* worrying about browser compatibility.
     
    seductiveapps.com, Jan 22, 2018 IP
  6. seductiveapps.com

    seductiveapps.com Active Member

    Messages:
    200
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #6
    and eh deathshadow, i put in that "stupid" loading screen recently, especially for people like you, who are stuck on 1980s internet speeds ;)
    it means i can soon-ish detect how many pixels worth of background picture to send over to the browser.
    that should reduce your load times by a bit.

    i also have, in the same seductiveapps github.com repository, a subcomponent that i call webappObfuscator, which is an advanced combiner-minifier.

    i'll see about plugging in another combiner-minifier (one i did not make myself) that would get used on the live site in default mode (note : i'll keep an option in there to load the actual sources, for review purposes)
    that should take a lot less time than also minify-ing the CSS, HTML and JSON along with it, which is what webappobfuscator is designed to do.

    so, to cut a long story short : i do take your criticism seriously, even though you bring the hate batton to every review.
    that's because i do want my stuff to eventually work on slower internet connections.

    but you *can* *not* *focus* on 10 things at the same time.
    functionality and efficiency of code-execution first,
    then browser compatibility,
    then more features to reduce the download size.

    and since i have large subsystems yet to write (users, groups, administration interface, settings per website address and etc, blog engine, photo album, cloud features that would end the need for my website's bytes to travel around the world, etc),
    it'll be quite a while before i add the features to really reduce download size.

    but the thing is : i'm preparing for that day, by including things like that stupid boot-up screen, now.
    that allows the proper information to become available on the PHP side,
    and one day that info will get used to send over just the right amount of artwork bytes.
     
    seductiveapps.com, Jan 22, 2018 IP
  7. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #7
    If 100/10 (recent upgrade) can be considered 1980's... but YOU seem to be unaware or flat out ignoring that EVERY handshake past the first eight files on a page can induce anywhere from 200ms to a full on second or more overhead REGARDLESS of the connection speed at either end, and based entirely on the geography, number of hops, and quality of network switches between the start and end point. Just take your ping time to the server, multpily by two (which is a bit of a ballpark guesstimate), take your number of separate files, subtract 8, multiply and divide by 1000, and there's a rough guesstimate of the overhead!

    Which right now from my 100mbps downstream connect I'm seeing 150ms ping times to your server. 160 * 300 / 1000 = 48 seconds of handshaking overhead REGARDLESS OF FILE SIZES OR CONNECTION SPEED AT EITHER END! The best case guesstimate you're supposed to use that's 32 seconds, and worst case 'real world' could push up past TWO AND A HALF MINUTES!!!

    In other words, INSTANT BOUNCE from the majority of users.... and NO, that isn't changing any time soon. Like... for DECADES. We'd have to abandon TCP/IP and HTTP for that to happen, and even then!

    Throwing more scripttardery at dicking around with the image size delaying the page-load isn't going to fix that either. Of course if you actually wanted to do that, you don't use javascript for it as that's a new feature of HTML 5, resolution/scaling detection to choose the correct image FOR YOU.

    see "srcSet"

    https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images

    Again, like 90%+ of the stuff you're throwing scripting at, it isn't stuff you should even be using JavaScript FOR!!!

    you're throwing JavaScript at stuff that has no business being scripted, flipping the bird at usability and accessibility, and telling large swaths of potential users to go f*** themselves. If I'm hitting the hate, it's out of disgust with that practice and the fear that some nube or rube might take the garbage you are doing seriously, only further pissing on everything a website should be.

    Then bother learning to use HTML and CSS properly, STOP throwing JavaScript at goofy nonsense that has no real business even being DONE on websites, and for the love of Christmas bother learning something about accessibility and usability; such as semantic markup, separation of presentation from content, progressive enhancement, legible colour contrasts, limitations of font renderers, limitations of the medium itself...

    As without those, if ANY of the stuff you were doing ended up deployed on a "real" website, such as healthcare, banking, governement, etc -- you are creating walking talking WCAG violations that CAN and typically WILL land your ass in COURT!

    That's where progressive enhancement comes into play.

    1) You start with the content or a reasonable facsimile of future content, organizing it in a flat text editor as if HTML and CSS didnt' even EXIST!

    2) Mark up that content SEMANTICALLY -- "semantic markup" being a sick euphemism for "using HTML correctly". We use said term so as not to offend the mouth breathers who think they have a pretty good handle on HTML when they clearly do not. "Using HTML Correctly" meaning all the markup at that point is there to say what things ARE, NOT what you want them to look like. <p> for GRAMMATICAL paragraphs, <h1> as the heading that everything on every page is a subseciton of. <h2> indicating the start of a major subsection of the page. <h3> as the start of a subsectoon of the <h2> before it. <h4> marking the start of the subsection of the <h3> before it, and so forth. <hr> meaning "a change in topic/section where heading text is unwanted/unwarranted" and NOT "draw a line across the screen". <ul> and <ol> for short grammatical bullet points or selections. <table> for tabular data not "Oh I want that style layout".

    ... and since that's the semantics step there should be no DIV, SPAN, ID, or classes at that point.

    3) Bend that markup to your will creating all your layout and style in the CSS, adding DIV, SPAN, ID, and classes where and only AS needed. Any classes and ID's should follow the mold of semantics, saying what things ARE, NOT what you want them to look like! If you're going to use classes like "flex-4-across" or "w3-red" or "xm-2-s wtf-omg-big" you might as well go back to writing HTML 3.2 and pretend CSS doesn't even exist!

    4) Then and ONLY once you have a fully working scripting off page do you have ANY business ENHANCING the page with JavaScript.

    Anything less than that approach is going to be a bloated slow train wreck laundry-list of how NOT to build a website, and NO, that isn't changing any time soon. In fact with some bills being proposed by various governments, said approach may quickly be the ONLY acceptable approach (on accessibility grounds alone) to come into compliance!

    Those should be one and the same -- if you do the "code for one then worry about the rest" approach it is too easy to paint yourself into a corner with techniques that flat out CANNOT be done that way in other browsers. I've seen that far, FAR too many times the past two decades. People did it in the early '00's with "code for IE, who gives a **** about anything else", I saw it in the mid '00's with "code for firefox, hack for IE", and such idiocy apparently continues today.

    If you aren't writing code that at LEAST works in Chrome, FF, and Edge SIMULTANEOUSLY, you likely shouldn't be writing scripting in the first place! Or at least, NOT for the front-end.

    Unless of course your ONLY intent is to go "ooh shiny" and tell visitors to your sites -- pretty much ALL of them -- to go perform an anatomically impossible act upon themselves.

    That's not trolling, that's the TRUTH. One you clearly don't want to hear.
     
    deathshadow, Jan 23, 2018 IP
  8. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #8
    Side note, just what browser IS it supposed to work in? I'm asking since all your pages in all the browsers I have here pretty much resolve to that screencap after some minute plus of stupidity. No menu, no content, just that.

    That goes for the "music player" in your signature too. 40 second to one minute load times for nothing. You might as well just show a blank page.
     
    deathshadow, Jan 23, 2018 IP