Slashdot Mirror


Best Browser For Using Complex Web Applications?

yanyan writes "I'm fairly new to the field of web application development. Currently I'm working on a big online ticketing system for passage and freight for a local shipping company. It's a one-man show and the system is written in Ruby and uses Rails. Aside from the requisite functionality of creating bookings the system must also print reports and tickets, and this is where I've discovered (the hard way) that most, if not all, browsers fall short. I've had to switch from Firefox 3.6.3 to Opera 10.53 because of a major printing bug in Firefox, but the latest stable Opera is also giving me its own share of problems. To complicate things, an earlier version of Opera (10.10) doesn't appear to have 10.53's printing problems, but I'm wary. What browsers and specific versions do you end up deploying for use with big, complex web apps that include printing? Also consider CSS accuracy and consistency."

347 comments

  1. but I thought HTML was supposed to fix all that? by FuckingNickName · · Score: 4, Insightful

    Hahaha, I kid, I kid. If your interface is complex, why are you using HTML/CSS/Javascript/etc? Why not take advantage of a more advanced and mature UI widget set, such as that provided by Java or *shock* the native environment?

    The web is about where MacOS was 20 years ago in terms of ability to deliver a rich application UI experience. Google are excellent at marketing it as some sort of advance, but it really isn't. Don't shoehorn.

  2. IE or Firefox by ageoffri · · Score: 4, Insightful
    Given that IE and Firefox pretty much set the standard, if you aren't developing for both of them then you are setting yourself up for failure. Sure you may be trying to do things the right way, i.e. fully standard compliant, but it isn't the real world answer.

    Figure out what you need to do with your application to make it work in IE and Firefox is the only real solution.

    --
    -- Slashdot, making the Left look conservative since 1997.
    1. Re:IE or Firefox by X0563511 · · Score: 2, Insightful

      The real world answer is go ignore IE and let all the people still using it go cry.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    2. Re:IE or Firefox by LowlyWorm · · Score: 1

      Agreed. IE probably has the most consistent (and most available) documentation. Since I often use client side JS I usually start with FF. Everything should be tested in FF and IE. You may also want to be aware of cellphone users. If presentation is that critical write separate scripts server side for each browser. If not, you may get away with much less scripting.

      --
      Time flies like an arrow. Fruit flies like a banana.
    3. Re:IE or Firefox by blackraven14250 · · Score: 1

      That's only true if the system is used by travelers and not travel agents to allow for the bookings.

    4. Re:IE or Firefox by Anonymous Coward · · Score: 2, Insightful

      Actually, the real world answer is design it for IE. If it works in IE then it will work in everything else. Besides, the JavaScript debugger in IE (Visual Studio) is vastly superior to Firebug, and yes, I've used both... I just don't suck the open source/free software ****.

    5. Re:IE or Firefox by ta+bu+shi+da+yu · · Score: 1

      Alternatively, if Firefox has bugs, has he filed a bug report?

      --
      XML is like violence. If it doesn't solve the problem, use more.
    6. Re:IE or Firefox by blincoln · · Score: 2, Informative

      Sure you may be trying to do things the right way, i.e. fully standard compliant, but it isn't the real world answer.

      I managed to write a web application a couple of years ago that not only displayed consistently in IE and Firefox, but also printed consistently from both of them, while remaining standards-compliant and not using HTML or CSS hacks. The printing was by far the harder part - the browsers initially returned very different printed results even though they rendered the page on-screen almost identically. Changes to the CSS would frequently fix the printing of one while breaking the other, yet not affecting the on-screen rendering of either.
      I can see why people who do a lot of printing lean towards PDF.

      --
      "...always new atoms but always doing the same dance, remembering what the dance was yesterday." -Richard Feynman
    7. Re:IE or Firefox by X0563511 · · Score: 1

      Well, if you are going to be like that, I do. Fuck IE, I don't care who uses it. I'm not, and my intended audience shouldn't either.

      (I'm not a developer though, so "fortunately" you don't have to deal with my opinion in any real manner)

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    8. Re:IE or Firefox by Anonymous+Psychopath · · Score: 2, Insightful

      The real world answer is go ignore IE and let all the people still using it go cry.

      That's not a "real world answer". That's an absurd geek fantasy. Love it or hate it, most people still use IE.

      If you're a web developer, you cannot afford to ignore that your users will make choices about which browser they use that may be different than your own.

      --

      Eagles may soar, but weasels don't get sucked into jet engines.

    9. Re:IE or Firefox by ChunderDownunder · · Score: 1

      From the summary "What browsers and specific versions do you end up deploying"

      That sounds to me that they're *deploying* a specific browser to a specific client desktop. That it may work in 'the real world' would seem a moot point.

      That said, avoiding too many browser-specific hacks may ensure a smoother upgrade path when deploying, say, version 3 to Chrome9.1 sometime in the future. (But hardly answers the question of which browser *today* prints best.)

    10. Re:IE or Firefox by powerspike · · Score: 2, Insightful

      The real world answer is go ignore IE and let all the people still using it go cry.

      .
      No that is not the real world answer. If you don't get your application working in IE, the people will go find one that does. You might get away with not working in IE if your only designing for the tech crowd, but if your designing for business or the public, then your killing your own business before it's started.

    11. Re:IE or Firefox by Hurricane78 · · Score: 2, Insightful

      I’m a long-term professional, and if you are developing for any specific browser, you are a failure, and not a professional.
      The goal is to know the W3C standards by heart in every minute detail (yes, it can be done, since I did it for years without problems), and design to it. In a way that allows you to spot things where not you are wrong, but the browser is!
      You only add browser-specific quirks after you’re done. Separated from the main code wherever possible.

      Otherwise you end up with a huge non-working mess as soon as you notice that your nice giant backbone of your webapp only works because of a quirk/bug/weirdness of that specific browser.

      Things like http://code.google.com/p/ie7-js/ greatly help with this. :)

      --
      Any sufficiently advanced intelligence is indistinguishable from stupidity.
    12. Re:IE or Firefox by Anonymous Coward · · Score: 0

      I unfortunately deal with the implementation side of web applications that are used by thousands of internal users. No matter what your interface styling, code (java, ruby, .net, peoplecode, etc.), or middleware. The absolute best applications that work are those which are written to standards that are currently supported. JavaScript that works, HTML and css that display properly in current browsers are what ultimately work best.

      Don't code an app so that it only works in one browser. Good luck switching to Opera.

    13. Re:IE or Firefox by X0563511 · · Score: 1

      No, if I were to develop something, I wouldn't /care/ about people who insist on using IE. I simply don't. If they want to go suffer elsewhere, that's fine. I refuse to actively support IE in any way.

      This is because I do these things for pleasure, for "fun."

      My job doesn't require me to do these kinds of things, so I have no obligations to please the stupid public.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    14. Re:IE or Firefox by FlyingBishop · · Score: 1

      If your solution doesn't work in the latest Opera, Firefox, and Chrome, you're not developing for standards. You're developing for whatever browsers you're developing for.

      If you are in a situation where you can dictate what browser your users use, you can do that, and I think it's fine to say that it can't be IE until Microsoft gets their act together. But the other three rendering engines - Presto/Webkit/Gecko - should be supported 100%.

    15. Re:IE or Firefox by morgan_greywolf · · Score: 1

      Except that he's not a web developer. He's developing what is, in essence, a point-of-sale or kiosk type system using intranet technology. That's why he's asking what browser he should use.

      In that case, it doesn't matter what he uses, so long as it does what he wants.

      I don't have an answer, really. I don't have any problems with printing from Firefox, Opera, or Chrome, but I'm running Linux. Ironic, too, because historically that would be exactly the reason printing wouldn't work consistently. But these days, it pretty much does for everything but applications that aren't coded to use CUPS. Those are exceedingly few these days.

    16. Re:IE or Firefox by Anonymous Coward · · Score: 1, Informative

      My 150k person company that services untold numbers of other users still requires us to be compatible with IE 6. Some of these people are responsible for very serious engineering and space and defense industries so it's not like it's an arbitrary industry.

      The "real world" uses all kinds of crap and if you can't figure out how to make your code work on all kinds of different browsers and systems and applications and networks and security systems then you're just not doing it right.

      It's not fun and it's not easy. I can't tell you how many times I've had to fix my applications to fix an obscure bug in an obscure browser or system. But guess what? That's the real world, asshole. Buck up or go home.

    17. Re:IE or Firefox by koreaman · · Score: 1

      Yes, everyone hates IE. Some of us live in the real world with real jobs with bosses who tell us what to do. What the fuck is your point? It's not like we develop for IE because we like to or because we are trying to make some sort of point.

    18. Re:IE or Firefox by koreaman · · Score: 1

      That's nice, but why are you commenting on a thread in which a guy is asking what he should use in his real-life job? Since you clearly admit here that your opinion is totally irrelevant to that situation.

    19. Re:IE or Firefox by koreaman · · Score: 1

      If it works in IE then it will work in everything else.

      Trolling?

    20. Re:IE or Firefox by X0563511 · · Score: 2, Informative

      You are assuming it's for mass-consumption. Take a look at the actual post, and you'll see it's an internal application.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    21. Re:IE or Firefox by X0563511 · · Score: 1

      If everyone continues to appease and build for IE, IE will never shape up or go away.

      You also know they (MS) won't just decide to give up. Someone has to make the move, and the ball is in our (everyone except MS) court.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    22. Re:IE or Firefox by TheQuantumShift · · Score: 1

      And since in the real world, people use macs and linux and whatnot (android and iphone) don't "code for x browser" code for the standards that IE, Gecko, and webkit all share. And quit trying to do everything in the browser, generate a PDF for download and let the user print with reader, preview or evince. Thats not the seamless "Experience" you've probably been tasked with, but it's the solution that covers all the bases reliably (except on windows which still doesn't come with a pdf viewer for some reason).

      Or just do what everyone else does, code for IE/Adobe and come back here to post about how awful it is.

      --

      Shift happens. Fire it up.
    23. Re:IE or Firefox by Psylok · · Score: 1

      OT

      If it works in IE then it will work in everything else.

      That's absolutely not true!
      Some people even say that IE is more powerful, that's cause it have more feature and accept some code (specially CSS rules) that are non standard, so if you use IE you see them right, while actually they aren't. /OT

      Back to the original question I belive there's no ONE BEST browser, it depend's on the language/library/API you use.
      For example if you run the mootools test http://mootools.net/slickspeed/ of different Javascript library with different browser you'll see different result, you will see that a browser can run many different library at similar speed while another can be especially fast with one and very slow with the other.

    24. Re:IE or Firefox by azrider · · Score: 1

      The printing was by far the harder part - the browsers initially returned very different printed results even though they rendered the page on-screen almost identically. Changes to the CSS would frequently fix the printing of one while breaking the other, yet not affecting the on-screen rendering of either.

      And did you manage to get it printing consistently on Windows (since you are including IE) using different brands of printers? How about on different workstations?

      When you are planning for an application that needs a consistent display appearance and a consistent print layout, the only way is to use an environment that is display agnostic (across platforms) and printer agnostic (across brands).

      If your only platform is Windows, you can get away with Direct-X for the display part. All else, probably X11.

      Printing means Postscript (with printers or drivers that can handle that for input) or PDF.

      --
      And ye shall know the truth, and the truth shall make you free.
      John 8:32(King James Version)
    25. Re:IE or Firefox by Mike+Mentalist · · Score: 0

      You are assuming it's for mass-consumption. Take a look at the actual post, and you'll see it's an internal application

      Looking at the actual post he is asking what is the best browser for what he wants to do. Your "bollocks to IE" answer is not a 'real world' answer at all.

      --
      I put my books on Amazon, Smashwords, Demonoid, ISOHunt and Pirate Bay. Search for 'Michael Cargill'
  3. My experience: by Roadmaster · · Score: 5, Informative

    In my experience, the easiest way to get a consistent and stable printing experience is by generating PDF. I have yet to have stability problems if this is done properly. As you're working with Ruby on Rails, using Prawn and Prawnto might be useful. However, if you absolutely positively must NOT use PDF for printing, then this probably won't help you.

    1. Re:My experience: by Jah-Wren+Ryel · · Score: 4, Insightful

      PDF gets used for all kinds of wrong reasons - I freaking loathe web designers who think a PDF is an appropriate substitute for a web page - but printing is the one place that PDF shines. Just make sure the user can easily and intuitively specify the paper size and you should be good to go.

      --
      When information is power, privacy is freedom.
    2. Re:My experience: by Gr8Apes · · Score: 1

      I will second this. PDFs are THE solution for printing, or even sharing strictly formatted documents, even electronically.

      --
      The cesspool just got a check and balance.
    3. Re:My experience: by afidel · · Score: 2, Interesting

      The only problems I've had is how in relationship to certain HP printers using Postscript drivers, they'll occasionally run into problems with certain PDF's containing values that are valid in later PDF specs but not valid for PS. If we hadn't done a huge amount of form design around PS I'd switch em to PCL and be done with it.

      --
      There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
    4. Re:My experience: by FranTaylor · · Score: 2, Insightful

      If the user is printing out standard forms to be used in shipping the last thing you want to do is let the user change the paper size.

    5. Re:My experience: by aztracker1 · · Score: 1

      I have to totally agree here... PDF is probably the appropriate tool for the job... though if it's an internal application and the printers are network enabled, you could drive the printing from the server, which may work better. Either way, there will be some issues in place. It would be nice if there were an *easy* option in browsers to actually set the browser to *NOT* print the header/footer for certain sites, then have respectable print css options, and it could work well still... The biggest drawback I've seen in web apps is they will print with the header/footer, and not always respect the print css rules.

      --
      Michael J. Ryan - tracker1.info
    6. Re:My experience: by Vellmont · · Score: 5, Insightful

      Absolutely agreed.

      Anything mission-critical like printing a ticket should absolutely NOT use something that could cause the whole system to break down when a single trivial update happens. HTML wasn't designed for printing, and it never will be. The browser is just a band aid put on top of a fundamental disconnect in technology and application.

      I'd even go so far as to say that unless you're outputting and printing from PDF or some other well defined and standardized print format, don't proceed any farther. You'll pay more for the problems down the road when the whole she-bang doesn't work for some dumb reason.

      --
      AccountKiller
    7. Re:My experience: by peterofoz · · Score: 1

      Ditto. I wouldn't rely on HTML/CSS and browsers to render something to be printed. Use PDF or an image to provide reliability in printing. If you plan to use barcodes, I'd suggest either interleaved 2 of 5 or one of the 2-d barcode formats like PDF417.

    8. Re:My experience: by pete-classic · · Score: 1

      It may also be worth noting that this is exactly the solution that no less minds than those at Google settled on. When you "print" in Google Docs, you get a PDF that you can print from the local machine's native print faculties.

      -Peter

    9. Re:My experience: by IdahoEv · · Score: 1

      I agree with using PDF for print consistency, I've used the pdf-writer gem in my Rails apps.

      On the other hand, I've never had a problem with printing and print stylesheets in Firefox, and have used that solution whenever I don't need pixel-accuracy in my printouts.

      --
      I stole this sig from someone cleverer than me.
    10. Re:My experience: by mikael_j · · Score: 4, Insightful

      He should at least make sure the form works with both A4 and Letter size papers, otherwise the company will be in for quite a shock when they decide to expand their business outside the US and find that the most common reaction to mentions of letter size paper is "Letter size? Is that what you call A4?".

      --
      Greylisting is to SMTP as NAT is to IPv4
    11. Re:My experience: by Anonymous Coward · · Score: 0

      We're currently using Prawn, but, for my next Rails app, I want to take a look at PDFKit:

      http://thinkrelevance.com/blog/2010/06/15/rethinking-pdf-creation-in-ruby.html

    12. Re:My experience: by Jah-Wren+Ryel · · Score: 1

      If the user is printing out standard forms to be used in shipping the last thing you want to do is let the user change the paper size.

      The user already gets to decide what paper is in the printer.

      --
      When information is power, privacy is freedom.
    13. Re:My experience: by jmactacular · · Score: 1

      Using PDF has many advantages when it comes to printing. You don't have to worry about whether the browser has turned on/off the setting to print background colors/images. You don't have to worry about extra headers/footers that a browser prints by default. You also have more control over fonts. That being said, most people still try to print web pages, without having to open up PDF. So, I like to use the css media=print for special tweaks that are only for print. The question of which browser to use though is determined by your expected end user demographic. And depends on whether you have any influence over which browser they choose, i.e. a company intranet. In terms of compatibility, it'll probably never be perfect. But if you're willing to do what it takes to get the job done, any browser can handle complex web apps. Getting it to work flawlessly in more than one at the same time, is the challenge. =)

    14. Re:My experience: by pctainto · · Score: 1

      If you don't want to learn Prawn and are more comfortable with HTML, use something like PDFKit, which is a wrapper around wkhtmltopdf, which basically just packages WebKit for PDF printing. You'll be able to use CSS3 and other niceties and it'll be consistent, since it's creating a pdf. Perhaps you can do better things with Prawn, but I guarantee that writing moderately complex reports will be easier with PDFKit then with Prawn.

      --
      I think my principles are reachin' an all time low
    15. Re:My experience: by DiegoBravo · · Score: 2, Informative

      Just please give the Windows users a link/suggestion to download a good PDF viewer, or at least anything less evil than Acrobat Reader.

    16. Re:My experience: by drinkypoo · · Score: 2, Informative

      If we hadn't done a huge amount of form design around PS I'd switch em to PCL and be done with it.

      I've had pretty good luck printing postscript to non-postscript printers using ghostscript as a filter. These days it's not even that computationally intensive, all things considered.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    17. Re:My experience: by kumanopuusan · · Score: 1

      You might also consider PostScript. It's a lightweight solution and you can output it without relying on an external library. Making lines and text is simple, so it's well-suited to printed forms.

      --
      Use of the words "good", "bad" or "evil" is almost invariably the result of oversimplification.
    18. Re:My experience: by arth1 · · Score: 1

      Indeed. As well as the printer.

      Hint: With a roll printer, neither PDF nor postscript work well. They both for some unfathomable reason internally sets the zero origin to the bottom of the paper, which precludes use on arbitrarily long papers.
      Otherwise, roll paper is the best choice for printing out web pages, simply because they can handle any length web page without breaking it.

    19. Re:My experience: by luis_a_espinal · · Score: 1

      In my experience, the easiest way to get a consistent and stable printing experience is by generating PDF. I have yet to have stability problems if this is done properly. As you're working with Ruby on Rails, using Prawn and Prawnto might be useful. However, if you absolutely positively must NOT use PDF for printing, then this probably won't help you.

      ^^^ This. The only other solution is to provide "print versions" of html output. That's the standard way to do for most things.

      I'm amazed when people try to use rich web apps for precise printing. Besides, what could possibly drive one to write a web app that does not does not display well on both IE and Firefox? I could understand accidental design decisions, but to meticulous and continuously implement requirements that makes it impossible to render the web ui on the two major browsers, it's like WTF?

      Either the requirements are invalid (in the sense that they are technically unattainable); there is a requirement/analysis mismatch; or (if the requirements are truly valid), a web ui is the wrong solution for them.

    20. Re:My experience: by theReal-Hp_Sauce · · Score: 1

      I work for a freight forwarding company that has a website which does similar things to what the poster has requested. Their website does exactly that. When it comes time to print, it is converted into a PDF.

      This also seems to make the saving and e-mailing of forms much easier too, just because most people with a computer will have a program to view a PDF file. However, (for example) the other freight forwarder in Innsbruck, Austria might not have Office 2007 yet, so if you send them a .xlsx file... They can't open it, or print it... and you just lost a full 24 hours (thanks to timezone fun).

      Further to that, I bet the guy in Innsbruck doesn't have Opera 10.53 either. And if by some chance he DOES have it, and you tell him he has to downgrade to Opera 10.10 so he can use your "handy" web program, he's going to tell you to go look up the definition of "handy"

      Now try explaining the following to the freight forwarding company you're working for:
      You: "Yes, it does all of the things you asked for, it's fan-freaking-tastic! Look at all these features. All you have to do is get all of your clients and offices and other users to download and install Opera 10.10 (or whichever browser you decide to cater to)"

      Them: "What's Opera 10.10"

      You: "It's this great niche browser that is the only one I could make work with my program, but you'll love it!... What's that sound"

      Them: "It's your paycheck being torn up. Thanks for your time."

      The trouble is, the people who work in freight are there to move freight. They know how to move freight, they specialize in moving freight (it is quite complicated sometimes). They do NOT specialize in working computers, they do NOT know what the difference is between Opera, IE & Firefox. And the real problem is, when it comes time to move somebodies freight... 95% of the time they need it moved RIGHT-FUCKING-NOW!! If people have to battle with web browser compatibility issues to use your program, they will simply stop using it.

      -hps

    21. Re:My experience: by Anonymous Coward · · Score: 0

      I second that. On the fly PDF generation is the way to go. Best of all : graphic programming is actually fun !

    22. Re:My experience: by bertok · · Score: 1

      In my experience, the easiest way to get a consistent and stable printing experience is by generating PDF. I have yet to have stability problems if this is done properly. As you're working with Ruby on Rails, using Prawn and Prawnto might be useful. However, if you absolutely positively must NOT use PDF for printing, then this probably won't help you.

      I've just recently come across a similar problem. I had to emulate an old-school line printer for an application, with very precisely defined printing, a very specific font with DOS line drawing characters in it that had to line up, etc...

      I found that by far the easiest method was to use Microsoft XPS. Generating it is a breeze, and it gives good control over layout. The client application is relatively light weight, which is a pleasant change. It's also trivial to embed an XPS reader into a client-side application, but it's hard with PDF. The client is written in a managed language, so it's got way fewer security holes than Adobe Acrobat, which is like swiss cheese in comparison.

    23. Re:My experience: by Anonymous Coward · · Score: 0

      I second this. 4 outta 5 of my last Rails apps required outputting a document of some sort, typically complex documents. Two solutions I've found that work depending on the requirements:

      RGhost: PDF generation, simple to use, if a bit verbose at some points. Totally on point for the printing needs, especially when there were graphics headers required. (I simply created an EPS file in The Gimp (can we change the name of this app, PLEASE?) and loaded it as the pdf template.)

      Spreadsheet: generates (mostly-)compatible Excel spreadsheets. This was even easier than the PDF for my needs, since no graphics were required.

    24. Re:My experience: by afidel · · Score: 1

      The problems more around testing and validation than it is about the printer itself. We wasted an ungodly amount of resources getting checks printed correctly for Canadian banks as an example, less than 1mm off on text placement and they rejected them. Going through all the effort and repeated tests with the banks would be very hard to justify for something that can be worked around by simply printing to our Xerox MFP's.

      --
      There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
    25. Re:My experience: by Anonymous Coward · · Score: 0

      He should at least make sure the form works with both A4 and Letter size papers, otherwise the company will be in for quite a shock when they decide to expand their business outside the US and find that the most common reaction to mentions of letter size paper is "Letter size? Is that what you call A4?".

      You're assuming he ever intends to target foreign customers. I write apps that generate PDF forms, and they all specify US Letter format, no option to override.

      Of course, they're mainly US government forms, so screw the rest of the world....

    26. Re:My experience: by smash · · Score: 1

      Thats a pretty shortsighted view. The US market for any product is at absolute most, 300m. There's a whole 5.7 billion+ other potential customers out there, and virtually none of them use letter size paper.

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    27. Re:My experience: by Anonymous Coward · · Score: 0

      I agree. Web is great for input, and pdf is great for printable output. html and css are meant for flexible environments, which paper is not.

      I use TCPDF, it's a free, and has more than all the things I need to generate pdf reports base. It will even do bar codes, which may be useful to the OP.

      --Dave

    28. Re:My experience: by Pieroxy · · Score: 2

      You never target foreign customers, until you do. Then it's too late.

    29. Re:My experience: by pjt33 · · Score: 1

      They also specify the bounding box, so if the printer can't handle it then it's a design flaw in the printer (or its driver).

    30. Re:My experience: by Anonymous Coward · · Score: 0

      A good subject line you could have used: "PDF works best for me".

    31. Re:My experience: by rawler · · Score: 1

      HTML wasn't designed for printing, and it never will be.

      Actually, it was much more built for printing than it was for YouTube (or Slashdot, for that matter).

      HTML itself is a document-format, intended to convey documents, with easily followed links to other documents. It's designed for essay-type documents, kindof what your word-processor produces.

      What HTML wasn't designed for, is absolute control over presentation and rendering. HTML originally was a content-oriented format, where it were much up to the browser to determine apt rendering, (similarily to Latex or DocBook) such that different browsers could present the content in a format suited to the terminal in question.

      Control over presentation came in much later with CSS, and have been struggling ever since, but at the core, HTML is still a content-conveying document format.

      That said, it's really quite sad, given the document oriented nature of HTML, how browsers STILL cannot format it decently for printing.

    32. Re:My experience: by Anonymous Coward · · Score: 1, Insightful

      You never target foreign customers, until you do. Then it's too late.

      Because changing a web application to support multiple paper sizes after it is in production use would be just crazy... right?

    33. Re:My experience: by FranTaylor · · Score: 1

      Yeah, you let the SOFTWARE choose the paper size depending on what country you're in.

    34. Re:My experience: by Anonymous Coward · · Score: 0

      report lab
      www.reportlab.com

    35. Re:My experience: by WarwickRyan · · Score: 1

      >PDF gets used for all kinds of wrong reasons - I freaking loathe web designers who think a PDF is an appropriate substitute for a web page

      Are you getting PDF confused with Flash?

    36. Re:My experience: by Ja'Achan · · Score: 1

      Not if you plan for it, it isn't. But you at least have to keep mind 'This might change later on, I can't make these assumptions.' If you don't keep that in mind, things can get real ugly real fast.

    37. Re:My experience: by Anonymous Coward · · Score: 0

      Until recently I even believed A* was an international standard for paper size.

    38. Re:My experience: by cynyr · · Score: 1

      That was my thought too, soon as you want something to print from the web best to just make a pdf. The format is well supported (on all platforms, cant even an iPhone view them?) and the layout is stable and it prints well.

      If someone knows how to make chrome scale a webpage to width when printing that would mean i could use chrome just about full time.

      --
      All of the above was encrypted with a Quad ROT-13 method. Unauthorized decryption is in violation of the DMCA.
    39. Re:My experience: by MrMr · · Score: 1

      Really? You prefer to be forced to print on US Letter or A4, even when the closest shop selling that particular paper size is 5000 miles and an ocean away?

    40. Re:My experience: by Pieroxy · · Score: 1

      If every shitty piece of code written for the app makes the silent assumption that the paper size is US Letter, then it's going to be crazy, yes.

    41. Re:My experience: by Kilrah_il · · Score: 1

      Until recently I even believed A* was an international standard for paper size.

      It is, and so is the metric system. At least in the US they're driving on the right side of the road. :)

      --
      Whenever in an argument, remember this.
    42. Re:My experience: by Anonymous Coward · · Score: 0

      Just give them a "PC LOAD LETTER" prompt and you're good to go.

  4. Stop using the browser for print by Simmeh · · Score: 5, Insightful

    Export your data to XML or PDF on the fly and have something sensible print it.

    1. Re:Stop using the browser for print by Neil+Hodges · · Score: 1

      XML, as in XHTML?

    2. Re:Stop using the browser for print by Simmeh · · Score: 2, Insightful

      no, as in XML-FO which is designed for publishing.

    3. Re:Stop using the browser for print by darkain · · Score: 1

      I'll second this. Look around and found some decent F/OSS PHP libraries to generate PDF documents. They do exist, and works well enough. This is what I had to do for an inventory management system that I develop for a client.

    4. Re:Stop using the browser for print by Hurricane78 · · Score: 0, Troll

      Sorry, but apparently you don’t know CSS very well. It is perfectly suited to layout print documents. Especially CSS 3.
      XML-FO is pretty much only a XML-typical annoyingly bloated variant of CSS.

      Why does everything have to be XML? It’s a badly designed format that fell for the KISS fallacy and got simplified so much that it got harder again.

      I prefer raw EBML. Which, when containing character data and with a small tag ID to tag name mapper can be converted to XML anyway.
      And RelaxNG’s C-like syntax. Finally something sane!

      --
      Any sufficiently advanced intelligence is indistinguishable from stupidity.
    5. Re:Stop using the browser for print by Simmeh · · Score: 2, Informative

      And you apparently don't know user agents very well, they suck for printing. OPs options increase by printing as PDF, or by using XSL-FO to convert to *any number* of other formats, even SWG or PNG.

    6. Re:Stop using the browser for print by luis_a_espinal · · Score: 1

      Sorry, but apparently you don’t know CSS very well. It is perfectly suited to layout print documents. Especially CSS 3.

      Perfectly suited? Specially CSS 3? That would presume that capability was "perfectly" implemented in previous versions of CSS and browsers of the time would render them for printing as intended.

    7. Re:Stop using the browser for print by Pascal+Sartoretti · · Score: 1

      no, as in XML-FO which is designed for publishing.

      Not exactly :

      • export your data to XML (in an XML dialect specific to your business domain)
      • design an XSLT stylesheet which transforms your XML into XSL-FO
      • use an XSL-FO processor such Apache FOP to generate e.g. a PDF document

      It may seem complex, but is actually simpler than it seems.

    8. Re:Stop using the browser for print by tepples · · Score: 1

      No, XML as in "something sensible" with a well-defined and well-deployed implementation. That means not XHTML, at least until Windows XP and IE <= 8 disappear.

    9. Re:Stop using the browser for print by Anonymous Coward · · Score: 0

      preach it brother! keep that functionality easily replaceable. tomorrow always brings better ways to do what you need.

    10. Re:Stop using the browser for print by smtrembl · · Score: 1

      Export your data to XML or PDF on the fly and have something sensible print it.

      Prince
      http://www.princexml.com/

    11. Re:Stop using the browser for print by Anonymous Coward · · Score: 0

      Exactly.

      If printing from pure HTML is an issue in your situation, then you need to transform the data as a printable PDF. It is very easy to do as most languages have some system or classes that deal with this.

      Regardless of what we as software engineers would like to make the standard browser, we are stuck developing for IE, FF, Opera, Chrome and yes, even Safari now. I usually tend to develop for FF first, then make the needed hacks and bug fixes for IE and the others.

    12. Re:Stop using the browser for print by Hurricane78 · · Score: 1

      Actually I already used CSS 2.1 for print, and it is already very good. You just have to know how to use it, and use a browser with a clean implementation. Like Webkit or Opera.

      NOT IE. At all. Ever. ;)

      Also, what I don’t get, is how my comment can even be considered a troll. Unless the moderator himself is a troll. Maybe that moderator should first clear his neuroses so he does not map his repressed anger from other situations onto my voice when reading my comments in his head. And maybe he should learn, that disagreement is not what the Troll moderation is meant to be used for.
      Oh well... gotta live with the dicks, even if they got mod points. ;)

      --
      Any sufficiently advanced intelligence is indistinguishable from stupidity.
  5. Chrome, PDF by amicusNYCL · · Score: 5, Insightful

    Even though I don't use it for development, I've got several of my clients using Chrome to take advantage of the Javascript engine. My applications use a lot of Javascript for the interfaces, and Chrome speeds up the rendering of large data sets compared to IE or Firefox.

    For printing, the only solution to keep you sane is to export reports as PDF and let them print through their reader. That's specifically what PDF is for (consistency in displaying and printing). Depending on the report, they may also appreciate a CSV version that they can do their own filtering and sorting on.

    --
    "Our two-party system is like a bowl of shit looking at itself in a mirror." - Lewis Black
  6. Lynx! by turtleAJ · · Score: 2, Funny

    All the way!

  7. Civility abounds by Just+Some+Guy · · Score: 0

    I welcome a calm, reasoned discussion of the topic's many nuances.

    --
    Dewey, what part of this looks like authorities should be involved?
    1. Re:Civility abounds by Narcocide · · Score: 2, Funny

      How about this then? What fucking printing bug?

  8. Printing from web apps? by Anonymous Coward · · Score: 0

    Generate a pdf for the user to download and print instead.
    Its the only reliable method.

    Also, why are you asking Slashdot what browser to use? Do you expect to have any say in the browser your end users have?!

  9. Why not fix the browser requirement by Anonymous Coward · · Score: 0

    How complete is the system at this time? Has it been used in production or is it still in development. If so, how many hands have been involved and how old is the original work? You may have bit off more than you can chew unless you can customize your own browser and code to use only it and its descendants.

  10. PDF? by Anonymous Coward · · Score: 0

    If your application really needs to print something ill recommend you to create a pdf server side and offer it to the client.

    you can transform your current html templates to pdf once they are filled with data with:

    dompdf: http://www.digitaljunkies.ca/dompdf/

    which uses tcpdf, aslo Free software: http://www.tcpdf.org/

    or some commercial reporting tool, but pdf is the way to go.

    you can even embed the pdfs inside the html, see http://blogs.adobe.com/pdfdevjunkie/2007/08/using_the_html_embed_tag_to_di.html

  11. Writing to a specific browser... by John+Hasler · · Score: 5, Insightful

    ...is a much more serious bug than any possible printing problem.

    --
    Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
    1. Re:Writing to a specific browser... by Anonymous+Psychopath · · Score: 2

      ...is a much more serious bug than any possible printing problem.

      I'd say mod parent up, but other people recognize the wisdom and have done so already.

      Do not write a web application tied to a particular browser, or even two particular browsers. You will repeat mistakes made 15 years ago when people used to do the same thing for Internet Explorer or Netscape. Those who come after will curse your name forever.

      Remember all those sites that used to say "Best viewed in IE5" or "Best viewed in Netscape"? You don't want that.

      --

      Eagles may soar, but weasels don't get sucked into jet engines.

    2. Re:Writing to a specific browser... by Beezlebub33 · · Score: 1

      But nobody has discussed how to actually achieve the 'don't write for a specific browser'. The answer is to use a library (Yahoo, ExtJS, Google, Prototype, etc) that takes care of that for you. Then, you write to the library and your problems are solved.

      --
      The more people I meet, the better I like my dog.
    3. Re:Writing to a specific browser... by Fnkmaster · · Score: 1

      Make a web app that works from any modern browser, and use PDF to address print formatting - PHP, Java and every modern web-oriented language I've used has several libraries to output that stuff. That's what I've done with every modern web app that needs pretty printed output.

      It's a bit more work than expecting HTML to just magically output in a consistent way on every printer from every browser, but you'll be much happier with the result in the end and you don't have to run around trying to micromanage which browser everybody is using.

    4. Re:Writing to a specific browser... by Pieroxy · · Score: 1

      Except when the library ceases to be maintained and then you have your entire stuff to write from scratch all over again.

      To be really honest, writing HTML and JavaScript is not very complex. Even across browsers. That is, if you stop hiring script kiddies which have been playing with CSS for a few month and get their documentation from Google. People that know their stuff are the only answer IMO. You know, much like you hire a real architect when you want to build a house, you also need qualified staff when you need to write a web app.

    5. Re:Writing to a specific browser... by rawler · · Score: 1

      I generally agree, but the description given here hints that the page might only be viewed on controlled terminals (bringing into question why using HTML), in which case targeting single browser is still principally bad, but practically maybe his best choice.

    6. Re:Writing to a specific browser... by Fujisawa+Sensei · · Score: 1

      ...is a much more serious bug than any possible printing problem.

      Sounds like he is learning a lesson that I learned more than 10 years ago. All browsers suck.

      --
      If someone is passing you on the right, you are an asshole for driving in the wrong lane.
    7. Re:Writing to a specific browser... by schnablebg · · Score: 1

      Qualified engineers do not rewrite well-tested, well-written, sophisticated toolkits! And why would you have to rewrite from scratch some open-source Javascript if it stopped being maintained? I would just build on the years of work already put into my library of choice.

    8. Re:Writing to a specific browser... by Pieroxy · · Score: 1

      The point is that a complex JavaScript library is hard to maintain. You (or I) might not be able to maintain it at the pace you need to. The thing is that a Java library on the server side is much less dangerous, because you are never forced to upgrade. If it isn't compatible with your future app server you just replace it, rewrite a portion of it, etc... And you have all the time you need to test it out before release.

      If the newest version of firefox isn't compatible with your JavaScript library, you HAVE to upgrade your library, whether you like it or not. And time is of the essence. The situation is not the same.

      That's why IMHO a JavaScript library is very dangerous.

  12. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    Parent is onto something. The web is fundamentally the wrong approach. Just because you're familiar with hammers doesn't make them the best tool for all possible jobs. Sometimes you would be better served by a saw.

  13. Punch in the eyeball by EmperorOfCanada · · Score: 5, Insightful

    If you forced me to use Opera to use your system I would demand that they find a new developer. Or as a customer I would find a new system.

    This is a classic example of a developer trying to tailor the user to the system instead of the system to the user.

    Stop your whining and just make it work in one or more of the common browsers. I have been forced to bend crap environments to my will and I suspect that most developers around slashdot have bent bad systems until they cried; but made them work in the end.

    1. Re:Punch in the eyeball by Traf-O-Data-Hater · · Score: 1

      Wish I had mod points, parent is absolutely correct. Stop complaining and trying to find some panacea for your architecture problems. It seems you want to have something you can show your client 'There! it works on THAT browser!' instead of thinking about the common denominator. There's no way I'd be happy having to use not just a particular browser, but a particular version of that browser - who are you trying to kid? The client and the user, it seems. Sorry if this seems harsh but that's my opinion.

    2. Re:Punch in the eyeball by cosm · · Score: 1

      Wish I had mod points, parent is absolutely correct. Stop complaining and trying to find some panacea for your architecture problems. It seems you want to have something you can show your client 'There! it works on THAT browser!' instead of thinking about the common denominator. There's no way I'd be happy having to use not just a particular browser, but a particular version of that browser - who are you trying to kid? The client and the user, it seems. Sorry if this seems harsh but that's my opinion.

      +1 Insightful. Browsers make decent end user solutions for light web apps, but finding an enterprise class solution that will only work for one build on one browser is like telling golfers they all have to use the same set of clubs to complete a course. It will not go over. No matter how 'great' it looks in X build of Y browser. Don't tie your application down to a specific environment; understandably web design is like trying to make a shoe that fits everybody, but making everybody else lop off toes to fit your shoe only pleases you, and pisses of scores of users in the process.

      Standards are only a guideline these days unfortunately, and one of the required skill-sets of an, dare I use a synergy-istic word, 'agile' developer is the ability to transcend the difficulties despite the simplicity of choosing the easier route for yourself, and designing a solution that fits a general environment.

      You wouldn't purchase the most bad-ass truck in the world, but on the stipulation that it could only go off-roading on Sundays between 2-8pm, during full moons, on the first Tuesday of every month. On the other hand, if your employer / client would purchase this truck, well, get-in, get-out, and get-paid, unless you want the possibility of feature creep out the ass and the maintainability nightmare of supporting a specific platform on a specific day of the week.

      --
      'We are trying to prove ourselves wrong as quickly as possible, because only in that way can we find progress.' RPF
    3. Re:Punch in the eyeball by Qzukk · · Score: 4, Interesting

      I have been forced to bend crap environments to my will and I suspect that most developers around slashdot have bent bad systems until they cried; but made them work in the end.

      I bent and bent, then cried and gave up and I had to tell my users to use IE. There's a table printing bug from 2005 that is still open, though fortunately my specific flavor of printing problems (entire rows of data going missing at page breaks) eventually went away several versions after firefox 2.

      Nowadays I use PDF, though several PDF generation libraries I've tried had serious deficiencies like being unable to tell me how much space a block of text will take before it places it on the page, or being unable to override Acrobat Reader's default printing settings, which fuck up anything you're trying to print onto an existing form. (I hacked it into fpdf once, but it was essentially a copy-and-paste of a command from another pdf that was able to force me to print with auto-fuckup-and-center turned off. It worked for me and my version of reader, but I didn't dare put it into production since I had to change the spec version fpdf inserts into the header (1.3) to one that supported overriding the printer options).

      If your reports don't need anything too fancy and they already pop out in HTML, you can use html2ps | ps2pdf to get something kinda resembling the original webpage. You can't make it look pretty and I'm fairly certain it's text only, but it'll print out exactly as it appears no matter what browser you are using.

      --
      If I have been able to see further than others, it is because I bought a pair of binoculars.
    4. Re:Punch in the eyeball by cynyr · · Score: 1

      If python is an option, look at Reportlab. I have no affiliation, but i have used to generate recipe cards from a web based app after fetching the data from a DB.

      --
      All of the above was encrypted with a Quad ROT-13 method. Unauthorized decryption is in violation of the DMCA.
  14. There's no "best" answer here. by pwnies · · Score: 1

    It sounds like the web-app you're using isn't coded well. Hate to put it that way, but if you're having this many problems with it, it's probably true. As for browsers to use - just switch until you find one that works. Try each of the rendering engines and browsers that use them (trident, webkit, gecko, presto, etc). Find one that works, use that.
    Next time around though, write the app better. Export to PDF/PS if you need formatting to be absolutely preserved.

  15. Define "printing problems" by DragonHawk · · Score: 1

    What are the "printing problems" you're having?

    If the problem is that you're having trouble making things look the way you want to (you mentioning printing bookings, which I suspect might need a very rigid format), you're not going to get away from that. HTML is designed to allow variation by browser implementation and by user preference. It's not supposed to look the same everywhere.

    If you need accurate, precise print reproduction everywhere, your best bet is to generate some kind of PDL (Page Description Language) on the fly. PDF is the common choice here, and prolly your best bet, since most people are used to it and already have software. Other choices would be PostScript and XPS, but those are much less commonly available in the user community.

    Note that "PDF" doesn't have to mean "Adobe"; there are tons of third-party PDF tools out there, including free and FOSS.

    --

    dragonhawk@iname.microsoft.com
    I do not like Microsoft. Remove them from my email address.
  16. Next Ask Slashdot... by by+(1706743) · · Score: 1

    Best PDF Viewer For Printing Complex Documents?

  17. Re:but I thought HTML was supposed to fix all that by amicusNYCL · · Score: 4, Informative

    Why not take advantage of a more advanced and mature UI widget set, such as that provided by Java

    Java is 20 years old, Javascript is 15 years old, and Java is mature while Javascript is not? Does that extra 5 years really make that much of a difference? Was Java considered not mature in 2005? There are plenty of mature Javascript UI libraries around that developers can take advantage of (ExtJS/Sencha, jQuery, Mootools, etc). There are several use cases where Java is a pain in the ass and an offline application is not an option. A rich internet application implemented in Javascript is perfectly fine for many situations. There's no shoehorn involved when it's the best tool for the job.

    --
    "Our two-party system is like a bowl of shit looking at itself in a mirror." - Lewis Black
  18. i.e.6 by Anonymous Coward · · Score: 0

    /ducks

  19. +1 Insightful by betterunixthanunix · · Score: 1

    The wheel is reinvented in computer science every so often.

    --
    Palm trees and 8
    1. Re:+1 Insightful by Angst+Badger · · Score: 1

      The wheel is reinvented in computer science every so often.

      With the web, it's reinvented veeeeeeerrrryyyy slowly. At this rate, it'll pass Windows 3.1 in about fifteen years.

      --
      Proud member of the Weirdo-American community.
    2. Re:+1 Insightful by Anonymous Coward · · Score: 1, Funny

      Yes and the new version isn't always circular.

    3. Re:+1 Insightful by IllusionalForce · · Score: 1

      Who needs circular wheels when you can have Internet connectivity with the vendor spying on motion activity? What would the world be without data protection freaks shouting at the vendor for taking note of ridiculously useless data, while the power bill required for that whole business is entirely neglected?

  20. Re:but I thought HTML was supposed to fix all that by Anpheus · · Score: 4, Insightful

    For recent programming languages, 5 years is a lifetime. Compare Java now to Java five years ago, or Javascript now to Javascript five years ago.

  21. mediatype:screen vs print by MoFoQ · · Score: 1

    yea...there's a reason why there's a media type definition for CSS.
    Plus using javascript to load browser specific CSS so I don't have to rely on CSS hacks and also keeps things "valid"

    Oh, and I dropped support for IE6.
    IE7 is going soon too as IE8 becomes mainstream among IE users.
    Still, I hate IE with a passion.

    My main browsers are FF3.0x+/3.5+, Chrome/Safari, and Opera 9/10....in terms of testing.

    1. Re:mediatype:screen vs print by reiisi · · Score: 1

      That's all very well and good, until you want to deal with paper sizes, fonts, and (heaven forbid) backgrounds in data cells in tables. (I really, really wanted that last one to work for a little app I have that is literally only half as useful without backgrounds in data cells.)

      Browsers try to be too many things to too many people.

      --
      Computer memory is just fancy paper, CPUs just fancy pens with fancy erasers; the 'net is just a fancy backyard fence.
  22. PDF if at all possible. Otherwise coughFlashCough by Zadaz · · Score: 2, Informative

    The only way that anyone does proper printing of web documents is as PDFs, and to hell with the browser. This is for very good reason.

    If your system absolutely must print from a web page, use Flash. Yes, I know. But it will print from within the page, it produces identical prints in all browsers/platforms, and everyone already has it installed.

  23. Off load printing to another application by jaymz2k4 · · Score: 1

    As many have suggested look at outputting your data in a format that allows it to be used in another application. I typically allow for CSV or PDF output. There are libraries out there to do that within your app. The path of least resistance is your friend. I have seen developers spend an age trying to replicate the functionality of excel for a web view when a CSV export would've been much more useful, cleaner and far easier to code.

    When in doubt have something else handle it!

    --
    jaymz
  24. Re:but I thought HTML was supposed to fix all that by aztracker1 · · Score: 1

    I don't think this is particularly insightful advise. A web interface works well, but regarding printing is a sore point. If they need particular printing enhancements, having a network accessible printer and the printing driven from the server may be better. Having the server issue a .pdf, or .ps set for the client to print would work too. Hell writing an extension for formatted printing would probably be ideal and I'd be surprised if nobody has an ns* extension for such a feature already written (though most will simply use PDF or PostScript directly).

    Beyond this, having a web interface allows you to switch client architectures fairly easily as long as you aren't too tied to one, which is the path many internal development efforts went towards in the later 1990's and early 2000's with IE5 and IE6. Frameworks like ExtJS offer a lot of rich functionality in web based applications. I would even suggest going with XUL over Java or .Net for this type of application myself. There are advantages to the centralized environment that browser based applications bring, namely a much lower cost for deployment.

    --
    Michael J. Ryan - tracker1.info
  25. Re:but I thought HTML was supposed to fix all that by betterunixthanunix · · Score: 2, Insightful

    "rich internet application"

    Can you define that term? I have seen it used to refer to half a dozen vaguely related concepts so far, so it would be nice to know which one you are referring to.

    "There's no shoehorn involved when it's the best tool for the job."

    The web is not the best tool for every job though, which I think was OP's point.

    --
    Palm trees and 8
  26. Use css print alternate by Anonymous Coward · · Score: 0

    You can use an alternate stylesheet for printing as opposed to mobile or screen. The browsers automatically select the print css and render accordingly when you print. You can use this to strip out things like navigation (which is hard to do on paper ;) ) that aren't relevant in that medium and optimize text styles so they are optimized for a nice printout.

    This tends to work best if you've laid out the site using CSS instead of tables.

  27. PDF by Anonymous Coward · · Score: 1, Interesting

    If you're trying to print from the browser, you're doing it wrong:
    http://thinkrelevance.com/blog/2010/06/15/rethinking-pdf-creation-in-ruby.html

  28. Short answer: don't. by TomXP411 · · Score: 1

    I wouldn't use the browser for printing. I would render the document to an RTF on the server, then hand it over to the client for printing.

    1. Re:Short answer: don't. by TomXP411 · · Score: 1

      Darnit, I didn't mean RTF. I meant PDF. :-) Although, RTF's work too, as long as a good word processor is installed.

  29. Re:but I thought HTML was supposed to fix all that by FuckingNickName · · Score: 5, Interesting

    Maturity isn't defined by the number of years since conception, but by its origins and the development and engineering which has gone into it since. HTML/Javascript has only comparatively recently been considered as a serious app development platform to contend with native apps, still building on the hypertext + scripting language paradigm. Even Google knows what a pain it is to work with HTML/Javascript directly and has developed a translator from Java to implement their web apps.

    What's more, there are very few use cases where an offline application (I assume by that you mean "not HTML/Javascript" - I'm not sure what's "offline" about Java) isn't an option. The basic selling point with HTML apps is that you don't have to spend 30 seconds downloading and installing a small binary. When you're writing for a corporation, that's reduced to insignificance because it'd be installed as part of the deployment procedure.

  30. One thing missing here by Aexia · · Score: 1

    that isn't clear from the description: Is this a tool meant to be used internally by the company or is it meant to be used by the general public?

    Because if it's the latter, whatever your solution, it better work in every browser and not just specific older version of Opera.

    1. Re:One thing missing here by Anonymous+Psychopath · · Score: 1

      that isn't clear from the description: Is this a tool meant to be used internally by the company or is it meant to be used by the general public?

      Because if it's the latter, whatever your solution, it better work in every browser and not just specific older version of Opera.

      It doesn't matter. You cannot guarantee what browser a user will have loaded today, much less a few years from now, whether it's in a corporate environment or not.

      --

      Eagles may soar, but weasels don't get sucked into jet engines.

  31. or just learn to use css by Narcocide · · Score: 1

    Use a print stylesheet, swap body classes to mask unwanted rules from the main stylesheet, then set key sizes in percentages so that it has some adaptability to different page sizes. I've seen it done correctly as long as you can assume a specific installed font or something with identical glyph bounding box sizes. Seriously. What print bug does Firefox have that's not actually just expected behavior if you know CSS?

    1. Re:or just learn to use css by Dr+Herbert+West · · Score: 2, Funny

      Sure... because CSS always formats uniformly across different browsers and platforms. And browser detection never fails or degrades over time.

      These kinds of issues are what Flash excels at-- uniform output. Why dont'cha push your final, scrubbed and parsed user data to a Flash widget to print? I believe there are all kinds of native PDF and print controls in the Flash API anyway.

      To alll you HTML5 kool-aid drinkers, flame away. Tell me how the canvas tag will fix all the OP's woes.

    2. Re:or just learn to use css by Qzukk · · Score: 1

      What print bug does Firefox have that's not actually just expected behavior

      Well, there's this one that's been critical since 2005. At least they've fixed the truncation problems and missing thead/tfoot (comments say that 3.0 release candidates fixed the dataloss) but it still has weird border issues in print preview. (note the missing bottom edge of the input above the first sample table... at least on my windows xp print preview anyway, it's a shame that windows printing is really a function of how shitty your printer driver is.)

      --
      If I have been able to see further than others, it is because I bought a pair of binoculars.
  32. Not reinventing the wheel?! by betterunixthanunix · · Score: 1

    Here I was, thinking that reinventing the wheel was a requisite part of developing a web app. Are you really trying to suggest that we leverage an existing and mature codebase for rendering and printing documents or processing data tables?

    Now, if only more people thought this way.

    --
    Palm trees and 8
  33. The "Best Browswer"... by NotQuiteReal · · Score: 1

    The "Best Browswer" is the one your paying customers use. For better or worse.

    --
    This issue is a bit more complicated than you think.
  34. Re:but I thought HTML was supposed to fix all that by betterunixthanunix · · Score: 2, Informative

    "I'm not sure what's "offline" about Java"

    Not that I disagree with you, but there are plenty of offline applications written in Java, using Swing. Java is not limited to applets and application servers, there is a mature library for standalone/offline application development. As I remember things, the reason we do not see more desktop applications written in Java is the bad reputation Java had in the 90s for taking a long time to loa, and to some degree the fact that Swing does not integrate with the desktop look and feel (or at least it did not the last time I checked, which was admittedly years ago).

    --
    Palm trees and 8
  35. Or export PDF, PS, etc. by betterunixthanunix · · Score: 1

    Or we can go with the simpler answer, exporting a format that will render and print correctly regardless of which browser (or browser version) or operating system is in use. Why waste time getting a stylesheet to work, when you could just render a PDF instead, especially considering the number of PDF authoring tools and libraries that exist?

    --
    Palm trees and 8
    1. Re:Or export PDF, PS, etc. by Narcocide · · Score: 1

      Well, while I think that differing expertise levels in different areas can make "simpler" a somewhat subjective concept, I also think that anyone making a "complex web application" owes it to themselves to learn at least enough CSS to be able to tell the difference between expected behavior and an actual rendering bug, rather than just assuming because Firefox is rendering their code differently the only option is to switch rendering engines.

  36. Use PDF by tibit · · Score: 1

    Generate PDF tickets on the fly. There are plenty of open source and commercial libraries to help you out.

    As for a "major" Firefox printing bug etc: you're doing something wrong. I presume that's since you're new. I have an in house monstrosity that prints invoices (think tables, lots of lines and tight alignments) fine across the spectrum: from IE6 to every contemporary browsers. All using CSS and HTML. So it can be done, and I've yet to run into any printing bugs, major or otherwise. There are hacks to be sure, but nothing I consider to be browser bugs, more like specification bugs.

    --
    A successful API design takes a mixture of software design and pedagogy.
    1. Re:Use PDF by micheas · · Score: 1

      The problem I had was that every browser had different printing preference settings.

      Do background images print?

      Are images scaled?

      Do images print at 72dpi? 300dpi? the alt text?

      Are fonts over ridden?

      The list just went on and on.

      Use a pdf library, it will save you time.

      Make sure that you can embed the fonts in the pdf. otherwise you will be dealing with all sorts of stupid bug reports.

    2. Re:Use PDF by yanyan · · Score: 1

      The major Firefox printing bug i was talking about is old and well-known: if a floating div ends up getting split across a page boundary, Firefox doesn't print the rest of the div. I'm not sure if it was fixed in some version, but the latest 3.6.3 has it.

    3. Re:Use PDF by tibit · · Score: 1

      In most browsers, you can adjust those printing settings programmatically AFAIK.

      --
      A successful API design takes a mixture of software design and pedagogy.
    4. Re:Use PDF by tibit · · Score: 1

      Floating div elements are not really meant to be split across pages, right?

      --
      A successful API design takes a mixture of software design and pedagogy.
  37. Try BrowserLab by saccade.com · · Score: 1

    If you want to do quick cross-browser testing, try Browser Lab.

    1. Re:Try BrowserLab by Anonymous Coward · · Score: 0

      Their System Requirements annoy me.

  38. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    Java's dead because people can never stop bringing up Applets.

  39. If you find Opera bug... by Anonymous Coward · · Score: 0

    Be sure to report bugs to their Desktop Team, the devs there are crazy when it comes to releasing builds (seen a few weekend releases). From my experience, they were able to solve my issues within 2-3 builds (a work week, give or take), whereas my Firefox bug reports take months (not to mention my pet peeve - Aptana bugtracker).

    They're currently preparing the next big version (10.60), so I believe they would be interested in fixing any important problem.

  40. Re:but I thought HTML was supposed to fix all that by linebackn · · Score: 2, Insightful

    >The web is about where MacOS was 20 years ago in terms of ability to deliver a rich application UI experience.

    Don't insult the mac like that. There were Mac apps back in 1984 that you can still only badly mimic via a web "application."

    The fact is that a web browser is an application that retrieves and renders hypertext documents over a network, and nothing more. Just because it has scripting and the web can make available documents to huge numbers of people, too many people think they can shoehorn any kind of application in to it.

    There is a huge demand for data entry and reporting (both viewing and printing) that web browser just aren't up to. If web browser ever get to the point where they have drag-and-drop form/report creation with a user interface that can be reliably delivered to client computers then great. Until then there needs to be something else to fill this void, and there just isn't. There used to be some very nice client/server GUI form and reporting tools back in the 90s, but most of those have devolved in to half-assed web tools with insane setup, configuration, and support requirements (and usually exorbitant enterprise pricing to boot).

    Heck, the last time I checked no web browser could even reliably be told automatically to print a page landscape!

  41. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    Lol yes, because if you ever happen to find a client-side Java application, the first thing that goes through your mind is how "advanced" and "mature" it is.

    Reality is that users hate that gray dialog window shit. Make it look like facebook and they won't care if it's slow/buggy/can't print right. The Web Won.

  42. Re:but I thought HTML was supposed to fix all that by DaveV1.0 · · Score: 3, Insightful

    I'm sorry but you have confused HTTP/HTML/Javascript with the internet.

    The fact is that this trend of using the browser as an interface is nothing less than having a hammer and treating everything as a nail.

    --
    There is no "-1 offended" or "-1 you don't agree with me" mod options for a reason.
  43. PDF is the way to go by Layth · · Score: 1

    Output to a PDF document and have them print it out.
    PDF is an open format. Go for it! Enjoy.

    Flash is an OKAY solution, but the printer support is hopeless unless your users have downloaded and installed an AIR application.

  44. Better write for all browsers by JThaddeus · · Score: 1

    You'd best cover IE, Firefox, and Safari at a minimum. I've been using the Google Web Toolkit (http://code.google.com/webtoolkit/) for the past 3 years and have been very happy with it.

    --
    "Love is a familiar; Love is a devil: there is no evil angel but Love." --William Shakespeare ('Love's Labors Lost')
  45. A third option... by dmgxmichael · · Score: 1

    Ok, I'm presuming that the problem is native browser printing. The printer section of CSS is the red headed stepchild of the spec with only Opera getting it remotely right. That leaves PDF which has been discussed. Given your description of the situation you might have a third option.

    If you're building this for an in house company as it sounds and the server is onsite consider creating a Postscript file and then commanding the OS to print the file normally. This cuts the browser out of the equation entirely and lets you get very specific with the printer since you can use system commands to control it fairly directly (or even cURL to it if the printer runs a webserver - some do). This solution is only viable if you have a specific printer or printers you're using regardless of the location of the computer that is commanding the print job be done.

  46. Re:but I thought HTML was supposed to fix all that by FuckingNickName · · Score: 2, Interesting

    Don't insult the mac like that. There were Mac apps back in 1984 that you can still only badly mimic via a web "application."

    You're right. I'm forgetting the beauty, simplicity and consistency of the 1984 Mac. I've been using the comparative UI mess that is OS X for too long.

    There used to be some very nice client/server GUI form and reporting tools back in the 90s

    The whole display / presentation / business client / business server / database multi-tier thing seems to have been broken horribly, so now presentation, business client and business server are merged on some cloud and delivered to a dumb graphical display. Why? Well, to take away control, of course.

  47. You've got it backwards. by poor_boi · · Score: 5, Insightful

    You've got it backwards. You don't write a web application and then go around installing 9 different browsers at 20 different patch levels in a search to find one which finally doesn't break while using your app. Rather, you write an application and install 9 different browsers at 20 different patch levels to make sure none of them break while using your app. Fix the app, not the browser. And if the problem is intractable in the most popular versions of the most popular browsers, change your framework.

    1. Re:You've got it backwards. by omni123 · · Score: 1

      Yep.

      Cannot stress parent enough--I don't see the point in forcing people to use one particular browser let alone one particular patch of that browser. You may as well not develop a web app and write an application for it because you're going to have to distribute that very specific version with it and the entire benefits of web apps are gone.

      It should work on all major browsers without any trouble (for the user) or its worthless.

    2. Re:You've got it backwards. by Anonymous Coward · · Score: 2, Insightful

      Thank you for that insightful comment. I can't believe some of the answers here. Please mod up the parent!

      To rephrase the parental answer: Your app has to work with all popular, modern browsers, and your app should be expected to change as new browsers, technologies, and browser quirks emerge. Not doing so is to build obsolescence into your app.

      The moment you choose a specific browser for your app is the moment other products choose different browsers for their apps. Then the user is screwed.

      New browser versions emerge, screwing you. Oh, the popular screenreader app is broken because you failed to consider it? That's YOUR problem. What, you don't support IE8 under SP4? That's your problem too. That's why web developers make good money - they do it right.

      Alternatively, one can step backwards to a "client/server" app in VB or whatever and to hell with the web. Yeah, you got a huge deployment burden in front of you then, but it seems like you're going in that direction anyway.

    3. Re:You've got it backwards. by Anonymous Coward · · Score: 0

      It sounded to me like the submitter was looking at a solution for a single user (or small group of users), namely the employees of this shipping company. There seems to be a common thread running around about how you should test your software to work with every imaginable browser and a few that have yet to be thought up. While that might be a good idea for a solution that will be presented to the outside world, it is really not necessary for these kind of "one-of" solutions. I would imagine, for a working system, his customer would have no issues installing IE, Firefox, Chrome, Opera, or any other browser if it got them the desired functionality. I would also bet they would be very unhappy paying even one extra day's worth of developing to ensure the system was compatible with multiple browsers.

      We shouldn't think that interoperability applies to all situations. Sure, interoperability is never in itself a negative, but the time and effort required to achieve it is wasted in many situations.

    4. Re:You've got it backwards. by leptons · · Score: 2, Interesting

      This is why the web industry is starting to wake up to 'Front-end engineer' as a job title. The days of 'web developer' are coming to an end and specialization is starting to take hold in the minds of the people designing websites more complex than craigslist. The idea that a 'Web Developer' should know all of the back-end technologies as well as being highly skilled at HTML/Javascript/CSS is coming to an end. There are now many jobs for 'Front-End Engineer' positions paying 100K+, because people have finally recognized the complexity of building front-end code to work across 5 different browsers and many revisions of those 5 browsers, on multiple operating systems. The back-end is typically much more predictable as the hardware and software platforms can be chosen well in advance, and that never really changes during development. And with the Flash wars going on between Apple and Adobe, HTML/Javascript/CSS is becoming even more important.

  48. Javascript, GMFB by fnj · · Score: 1, Informative

    Forget the comparison of years of age. "Javascript" and "mature" are not words which in any sense could ever be considered compatible. After one hundred years, Javascript will still not be a mature language. It is crap by its nature.

  49. Render to PDF by wiredlogic · · Score: 1

    Forget about trying to make HTML into dependably formatted print output. Just use a library like Cairo to render what you want into a PDF and provide that to the users.

    --
    I am becoming gerund, destroyer of verbs.
  50. For printing use PDF via LaTeX by corsec67 · · Score: 5, Interesting

    I also develop for Ruby on Rails, and we have to support IE 6-8. (Of course the developers all use Firefox for Firebug)
    For printing, I switched to using LaTeX, and returning the PDFs.

    HTML just doesn't give you the kind of control that you need on a piece of paper.(Try having custom page headers/footers, for example) I ran into the bug in firefox where it would skip rows of a table going over a page boundry, and then there was other issues with it dropping images on other pages.

    Plus, LaTeX just looks better. HTML is great if you don't know what it is going to be displayed on, but when you do know what kind of paper it is going to be displayed on, HTML isn't the best choice.

    (Specifically, I used the rTeX plugin, with pdflatex)

    --
    If I have nothing to hide, don't search me
    1. Re:For printing use PDF via LaTeX by Anonymous Coward · · Score: 1, Interesting

      The amount of work to make LaTeX not look like an academic article is boggling. Hell, the amount of work just to figure out how the fuck you escape basic punctuation so your file compiles is boggling.

      Just use a normal PDF library.

    2. Re:For printing use PDF via LaTeX by PDAllen · · Score: 2, Informative

      It's really easy to make LaTeX not look like an academic article: just use the right documentclass. If your file starts \documentclass{article} then you probably will find it hard to play with settings to make it not look like an academic article...

    3. Re:For printing use PDF via LaTeX by corsec67 · · Score: 1

      Yes, escaping is indeed fun.

      Which is why I used a library: <%= l @string_of_punctuation_goodness %> escapes things just like h() does for HTML.

      --
      If I have nothing to hide, don't search me
    4. Re:For printing use PDF via LaTeX by rawler · · Score: 1

      Of course the developers all use Firefox for Firebug

      Just a tip: I too used to use Firebug, but have since mostly moved over to Chromium for it's excellent built-in developer-tools. I'm very happy with it, and generally recommend everyone to give it a try.

    5. Re:For printing use PDF via LaTeX by Anonymous Coward · · Score: 1, Informative

      there is also prawn for pdf generation with ruby.

    6. Re:For printing use PDF via LaTeX by dkf · · Score: 2, Informative

      The amount of work to make LaTeX not look like an academic article is boggling.

      Then you're doing it wrong. The usual first trick is to make sure you've chosen the fonts right; most people don't understand the difference between styles and fonts and you sound ignorant enough to also make that blunder.

      Hell, the amount of work just to figure out how the fuck you escape basic punctuation so your file compiles is boggling.

      You have a library for that. Going all hair-shirt and doing it by hand is just foolish.

      Just use a normal PDF library.

      Depends on the size and complexity of the document being produced. If it's really rather large and complex, then build it as XML, use XSLT to map to XSL-FO, and then convert that to printable form. (IIRC, at least one XSL-FO system uses LaTeX as a back end...)

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
  51. Re:but I thought HTML was supposed to fix all that by fuzzyfuzzyfungus · · Score: 1

    In the variety of web-based (or web-frontended) systems I've seen, it is somewhere between common and ubiquitous for any serious printing(ie. where fidelity matters, not where somebody just needs a bunch of text to scribble on or take to a meeting) to be handled by having the server spit out a .PDF, as you suggest.

    HTML, by design, Is Not a fixed-layout page description language. This is one of its great virtues. Assuming the designer doesn't muck it up, it should reflow nicely, or at least adequately, onto a variety of monitor shapes and sizes, and browser capabilities. However, that makes it a pretty terrible substitute for PDF in any situation where you want to spit stuff onto standard sized paper in a precise way.

  52. third party standards by Anonymous Coward · · Score: 0

    Use third party options for consistency.

    For webapps: Flash or SilverLight (I'd include Java, but I've been burned too often with version upgrades causing bugs)

    For printing: PDF

  53. Re:but I thought HTML was supposed to fix all that by Hurricane78 · · Score: 1

    By the way: Why don’t we replace the browser with a window containing tabs of virtual machines that un-freeze a tiny local memory image containing common libraries (also for backward compatibility) that can run remote executables, either as a thin client or as a real application.
    Then we only have to have the ability to separate tabs our to being their own windows and having the ability to have an icon in your start menu.

    And suddenly we have the best of both worlds: Complete encapsulation, simple development for simple projects with XHTML/CSS/JS/..., and the ability to run full applications.
    Done right, it should also be faster than JS or a VM running a full OS.

    Maybe I should talk to the Firefox team about it. Or the VirtualBox guys?

    --
    Any sufficiently advanced intelligence is indistinguishable from stupidity.
  54. Re:but I thought HTML was supposed to fix all that by slashchuck · · Score: 1

    I wrote a web-based certificate issuing app. The layout of the certificates was mandated by law. I have found that creating PDF's is the best way to ensure that printed output stays consistent with the report design requirements. Plus you can easily save them locally or email them with the assurance that the recipients will see the same report you designed.

    --
    $sig not found
  55. For starters by Anrego · · Score: 1

    Don't even bother trying to use HTML to make printing work. Generate something else (pdf is good.. consistent, widely supported.. evil) and have the user print that.

  56. This usually isn't a problem by tsotha · · Score: 1

    had to write to or (in b2c) the website is expected to handle any browser the user might reasonably have, starting with IE6.

  57. Re:but I thought HTML was supposed to fix all that by glavenoid · · Score: 1

    It was only relatively recently that some hacker has designed their whole website (can't find it now) in a pretty impressive javascript mock-up of GEOS for the C=64.

    Maybe we'll hit MacOS classic type web-interfaces sometime in the next 5 years :-)

    --
    I, for one, am looking forward to the inevitable /. beta rollout fallout.
  58. Oh really? by ChunderDownunder · · Score: 1

    Most place I've worked at recently have firefox installed, except for that one pesky intranet webapp that only runs in IE6 (and higher if you're lucky!)

    I'm not advocating the tie-in to a specific version of Opera. However, with an army of IT support personnel keeping things real, I don't see it should be a huge deal, given whatever other cruft they routinely install and maintain in an SOE.

    (Assuming of course this application is locked down to an internal network)

    1. Re:Oh really? by Anonymous+Psychopath · · Score: 1

      Most place I've worked at recently have firefox installed, except for that one pesky intranet webapp that only runs in IE6 (and higher if you're lucky!)

      I'm not advocating the tie-in to a specific version of Opera. However, with an army of IT support personnel keeping things real, I don't see it should be a huge deal, given whatever other cruft they routinely install and maintain in an SOE.

      (Assuming of course this application is locked down to an internal network)

      I'm assuming you've never worked anywhere with more than, say, 10,000 employees?

      But that's beside the point. If you are going to dictate the browser application used to access a web application, what exactly is the point of developing it as a web application in the first place? Just develop it as a native OS app and move along.

      If you want the platform independence of a web application, then that's what you develop.

      --

      Eagles may soar, but weasels don't get sucked into jet engines.

    2. Re:Oh really? by ChunderDownunder · · Score: 1

      I'm trying to be pragmatic here, the application has already been developed - as a web application. Perhaps a native application may have been a better choice but scrapping a ruby-on-rails delivered solution may not be feasible in the timeframe.

  59. Screen versus print. by tsalmark · · Score: 1

    HTML should render adequately in any browser - or your doing it wrong. In print I thoroughly suggest very literal html/css as in absolute measurements for everything. Or if warranted pass the HTML through princeXML on its way to becoming a PDF, you will have much more consistent results that you can count on.

  60. Print Direct from Server by ssufficool · · Score: 1

    If your end users are known (Internal Customers) then what I do is use IPP to print direct to known printers using postscript. This is a rare situation though, but the plus is that it works across all platforms/browsers and you can guarantee consistent output.

  61. *sigh* by balbord · · Score: 1

    Look here, son.
    I've dealt with myriads of printing problems over the years on every fu****g imaginable browser.
    I'm having a hard time believing you're having a hard time because of firefox.
    Give examples or be laughed at.

    now... if you can correctly diagnose why a PHP script gives "Cannot send session cache limiter - headers already sent" with a one liner <?session_start()?;>, I'll give you some credit.

    --
    "If I have been able to see so far, It is because I went out and bought a damn binoculars" - Ze da Esquina
    1. Re:*sigh* by Anonymous Coward · · Score: 0

      Let me guess, your editor placed a UTF byte-order mark at the beginning of the file? And since the BOM is sent before the code is run, you get a "headers already sent".

  62. skill by Skal+Tura · · Score: 0, Troll

    This guy just seems clueless and skilless to produce high quality web applications. ie. he has just bitten too big of a bite for his level of skills.
    Most web developers are actually quite unskillfull, he apparently is more than the average joe there, but by no means good.

    Printing problems wouldn't exist if he'd just use his brain... For example, there is a method to load CSS just for printing, and only for printing ...

    Especially without examples, it's highly likely he is confusing his own ineptitude with system/platform problems.

  63. Re:but I thought HTML was supposed to fix all that by gatapia · · Score: 1, Troll

    Hahaha, I kid, I kid. If your interface is complex, why are you using HTML/CSS/Javascript/etc? Why not take advantage of a more advanced and mature UI widget set, such as that provided by Java or *shock* the native environment?

    The web is about where MacOS was 20 years ago in terms of ability to deliver a rich application UI experience. Google are excellent at marketing it as some sort of advance, but it really isn't. Don't shoehorn.

    This is just soooo wrong. I don't know if your kidding about the MacOS 20 year ago thing or if your just really ignorant about web development. I suggest u look at - Bespin IDE (http://mozillalabs.com/blog/2009/02/introducing-bespin/) - Apps like MET (http://www.picnet.com.au/met/) - Google Apps - YouTube To the original question asker. There has to be huge reasons to abandon web for native development. And as for Java, sheesh really? Java lost the applet battle about 5 years ago. JavaScript is now a powerful full fledged language that is FAST!!! (Ofcourse not as fast as native languages, but you will not notice this unless you are doing bad things) Html5 + CSS 3 is an incredibly powerful, flexible and extremely easy to use UI platform. Do not underestimate these 2 ladies. So Ignore what idiot poster posted above and use cross browser html with PDF for printing as suggested by many more knowledgeable people in this thread. Guido

  64. Re:but I thought HTML was supposed to fix all that by luis_a_espinal · · Score: 1

    Java's dead because people can never stop bringing up Applets.

    Say what???

  65. Don't use browsers for printing. by Anonymous Coward · · Score: 0

    In this developers opinion, don't use a browser for anything beyond printing a simple receipt. If you need to serious layout use something like PDF or if you relay like to abuse your self and want to drop some cash, Crystal Reports.

  66. Back to April 1, 1996... by beanluc · · Score: 1

    ...which was when I started the trend whereby webmasters would badge their sites with "This site best viewed in MY browser"

    --
    Say it right: "Nuc-le-ah Powah".
  67. Re:but I thought HTML was supposed to fix all that by luis_a_espinal · · Score: 1

    "I'm not sure what's "offline" about Java" Not that I disagree with you, but there are plenty of offline applications written in Java, using Swing. Java is not limited to applets and application servers, there is a mature library for standalone/offline application development. As I remember things, the reason we do not see more desktop applications written in Java is the bad reputation Java had in the 90s for taking a long time to loa, and to some degree the fact that Swing does not integrate with the desktop look and feel (or at least it did not the last time I checked, which was admittedly years ago).

    The problem is that most Java green horns have never seen anything other than webbie Java applications. Actually, most Java developers (be it junior or uber-senior) have never seen anything other than that (or back-end/workhorse systems not directly connected to web back ends).

    So, it is not surprise people have no clue as of Java desktop application. Even now it is still of a bitch to write them, even with designers like Matisse, JBuilder's GUI designer or the Eclipse Rich Client Framework.

    I would not be surprised if the percentage of non-thin-client Java development (including but not limited to Swing thick clients) is less than 0.01% - there are literally thousands of Java shops where I live, but I'm only aware of three/four (mine being one) that are not web-client-related.

  68. Re:but I thought HTML was supposed to fix all that by luis_a_espinal · · Score: 1

    Why not take advantage of a more advanced and mature UI widget set, such as that provided by Java

    Java is 20 years old, Javascript is 15 years old, and Java is mature while Javascript is not? Does that extra 5 years really make that much of a difference? Was Java considered not mature in 2005? There are plenty of mature Javascript UI libraries around that developers can take advantage of (ExtJS/Sencha, jQuery, Mootools, etc). There are several use cases where Java is a pain in the ass and an offline application is not an option. A rich internet application implemented in Javascript is perfectly fine for many situations. There's no shoehorn involved when it's the best tool for the job.

    Uh, newsflash. It's not about JavaScript, but about the medium JavaScript operates: HTML. The only viable version of it for RIA with consistent behavior *might be* HTML5... and newsflash again, that's not a mature technology.

  69. Re:but I thought HTML was supposed to fix all that by wraithguard01 · · Score: 1

    Java is significantly better now that it was years ago. It's not slow anymore, and I can make Java look exactly like any Win XP or Linux native app in just a few lines of code. Granted, I'm not aware of any easy way (if any) to make it look like a Win 7 native app, but it's looking like it will just be a matter of time before that happens. We are writing a Java Desktop application at work, and we are even doing things like allowing the user to select the theme of the app. Java has very much improved over the last several years.

  70. WebKit by Anonymous Coward · · Score: 0

    WebKit is Firefox compatible, is the platform on which Safari is built, as soon also will KDE's Konqueror which is prided for its ACID 3 compliance. The downside of that is that most of the web is not so compliant. There are many sites which Konqueror still has problems displaying correctly. However, for a stable, standards compliant rich application platform its a good choice.

  71. Re:but I thought HTML was supposed to fix all that by wraithguard01 · · Score: 1

    Java may end up dying, but the JVM will not, because it is very low level, and deployed almost everywhere. Languages are popping up all over the place.

  72. SVG? by Merdalors · · Score: 1

    Is SVG a practical option yet, or is it still not supported by enough browsers? Without a special plug-in, I mean.

    --
    Slashdot entertains. Windows pays the mortgage.
  73. Re:but I thought HTML was supposed to fix all that by FuckingNickName · · Score: 5, Insightful

    Apps like MET (link)

    Yes, privacy implications are another great reason to avoid web apps.

    Google Apps - YouTube

    QED. All of these are pale imitations of native apps when it comes to feature sets, responsiveness and UI.

    There has to be huge reasons to abandon web for native development.

    Other way round, dude.

    Java lost the applet battle about 5 years ago.

    What does that even mean? Google Apps are mostly written in Java and translated, so clearly the largest web app producer on the planet likes the language (just not the level of control a client could maintain if Google actually deployed Java). Java is still going to execute faster than HTML/Javascript - hell, we're only just starting to see hardware 3D acceleration, something Java's had since 2001. If you're about to bitch that Swing is ugly, it can be skinned, or you can use SWT which builds on top of native widgets.

    Of course, this is just an argument that Java is better than HTML/Javascript for client/server apps; the best solution is whatever gives the user the richest client experience, employing a domain-specific remoting protocol (e.g. IMAP for e-mail) for transferring information between client and server at the business rather than presentation level.

    Java lost the applet battle about 5 years ago. JavaScript is now a powerful full fledged language that is FAST!!!

    Your definition of "fast" is a comparison with last year's Javascript interpreter/compiler. My definition of "fast" is comparing responsiveness of a whole native app vs a whole HTML/CSS/Javascript app.

    Html5 + CSS 3 is an incredibly powerful, flexible

    Compared to what? HTML4 + CSS2? Yes, in theory - pity it's not actually implemented fully or stably by any browser yet, just like all recent W3C standards (whence the OP's problem).

    Compared to native Windows / Cocoa / Java UI? No.

    and extremely easy to use

    You need to try Xcode. Or its older (and wiser) sibling, Smalltalk. That is easy to use.

    So Ignore what idiot poster posted above

    If I had a hammer, I'd hammer in the morning...

  74. Re:but I thought HTML was supposed to fix all that by Antique+Geekmeister · · Score: 1

    Because "mature" or not, Java is a resource pig and inherently unstable. The "Wrote Once, Run Anywhere" model has never worked for Java.

  75. Re:but I thought HTML was supposed to fix all that by Hooya · · Score: 2, Interesting

    after close to about 12 years of developing for the web - from perl CGI scripts to PHP, Java JSP - JSF, python, RoR and various other related things I've finally given up on browser based apps. I do use HTTP/JSON for an interface between the server side and the client side. That allows the server side to be used from AJAX frontend or from a Java desktop app or what have you. But a strict browser based software - never again.

    For a 'rich' client app I would use either: Qt (python/ruby/c++ in order of preference), Java or even VisualWhatever (if I were tied to windows - I try to keep it cross platform).

  76. use HTML/Javascript standard by anton_kg · · Score: 2, Informative

    You should not care about bugs in the browser. Use frameworks (sometimes with workarounds) or standard HTML4/HTML5/Javascript1.x code. File bug reports for whatever you find in browsers. The rest is just wasting your time and you might end up in the deadend as it happened with ie6.

  77. which browser, and more... by Anonymous Coward · · Score: 0

    I've read through just about every post, and I see lots of good advice, but it seems like nobody has actually answered the first question - of which browser to use. So, to answer a question with a question - have you even tried Safari? My experience is that it handles printing and standards based web sites better than any other browser I've tried (yes, on Win & Mac), although it has numerous issues with sites that were developed specifically with IE6 in mind (of course maybe that's because it tries to adhere to standards and puts no effort into supporting IE hacks).

    I agree with the majority of posts here - printing should be done with PDF, so have your server cough up PDF files when users generate reports. Development - AJAX, HTML5, CSS3. In any case you really do need to test and support 3 or 4 major browsers (but not IE6). You don't want to fall into the trap of developers past - completely dependent on one single browser, like the poor folks who wrote exclusively for IE6, and now all their work is broken (just ask the folks in my company who have spent the past 2 years and hundreds of thousands of dollars fixing the back end systems that don't work anymore). Wow, I just read all the stuff I just wrote, and it sounds like I really have a thing against IE6... uh, yea.

  78. PDF for printable pages by belrick · · Score: 1

    Why not generate PDF for printing purposes?

  79. If you can't beat 'em... by Anonymous Coward · · Score: 0

    Unfortunately, in my experience, you can't really control the software used by the client (if you can, you are either on a very locked down intranet, or very lucky indeed).

    The web browser you search for just doesn't exist. Not only do all browsers have their own quirks, what's worse is that not all users have your eventually selected favorite.

    It sounds like you're a part of a company that's been around for a little bit before you dove into this project. Do they have some information on your client base? If they've been writing web applications before this point, I would hope they would have *some* statistics. If not, Google Analytics can be your best friend - drop that into some existing sites used by the same client base and see what OS/browser/version they're all using. It's not perfect, but what is?

    At my current job, we have GA tagged on nearly 80% of the site. We get a pretty good view then of the browser demograpics of our users through GA, and then we can set some nice, number-driven goals. For example, "Our site will look and behave consistently for 95% of our users". Then, to meet that goal, we choose the top browser/version until we get enough coverage.

    So really, trying to find a web

  80. It's not your decision by JoltinJoe77 · · Score: 1

    If you are a one man show developing for a large company, I'm afraid the choice of browser is not yours to make. While compatability is nice, the common case that will use your application is the company standard browser so you better make sure your code runs really well on that.

  81. Use a good JavaScript library by Anonymous Coward · · Score: 0

    Use a library such as ExtJS (or something similar) for the web-based UI combined with server-side PDF generation for printing. A library such as ExtJS will shield you from much of each browser's CSS quirks while providing a consistent user experience and look-and-feel.

  82. You are fighting an uphill battle... by FlyingGuy · · Score: 1
    • Stop supporting IE 6 period. MS does not even support it anymore.
    • Stop trying to print using HTML, it does not work. Use PDF there are plenty of libs out there for most all the scripting languages.
      • Make two links on your site to PDF readers if the user does not have one. The first to Foxit (tiny and fast ) and the second to Acrobat.
    • Support as narrow a range of browsers as you can get away with I would just stick with FF 3.5 and above and IE 7 or better.
    • Stay as far away from exotic CSS as you can, in other words do the least you have to to make the site look correct. I don't care what the zealots say, use tables to align things because DIVS will act different from Browser to Browser. Not the tables don't, they just do it much less.
    --
    Hey KID! Yeah you, get the fuck off my lawn!
    1. Re:You are fighting an uphill battle... by Dr+Herbert+West · · Score: 1

      Mod parent up: +1 DIVS suck! I'm not a fan of tables either, but everything gets shifty when you put it in a bunch of styled DIV tags.

  83. applet for printing? by fatbuttlarry · · Score: 1

    To the OP:

    Have you considered handling printing with an applet to minimize browser cross-compatibility issues?

    Sorry to plug my own (FOSS) software, but you can't simply pick a browser to code to, you can only pick a minimum supported browser version to code to, and you ALWAYS have to support the big names, and the big versions so your customers are happy.

    Printing with jZebra might solve your main printing issues, especially if they're set up on the OS as Generic/Text printers. -Tres

  84. Re:but I thought HTML was supposed to fix all that by Mr.+DOS · · Score: 1

    ...like any Win XP or Linux native app in just a few lines of code.

    Well, like any Gnome app. There's no “native” LAF for KDE yet.

  85. Re:but I thought HTML was supposed to fix all that by nixkuroi · · Score: 4, Informative

    I will be flayed alive, but Silverlight 4 is a "Rich Internet Application" framework and with the most recent version, they built in some very tight and effective printing functionality. That, in combination with the ability to pretty much lay things out exactly as you want, export to an image or text format, export the app to an out of browser desktop app, and print in whatever format you see fit, makes it ideal for the kind of ticketing system you're talking about.

    Here's a blog on how to implement it: http://wildermuth.com/2009/11/27/Silverlight_4_s_Printing_Support
    And another: http://www.silverlightshow.net/items/A-look-at-the-Printing-API-in-Silverlight-4.aspx

    and here's Microsoft's page hyping it: http://www.silverlight.net/getstarted/silverlight-4/

    Here's a blog on linking Ruby on Rails with Silverlight as well: http://techblogging.wordpress.com/2008/03/26/using-silverlight-with-rubyonrails/

    Hope this helps.

  86. Not so fast... by randyleepublic · · Score: 0

    It's easy to huff and puff with righteous indignation at poster's not getting it re web app development. However, I can easily imagine a scenario in which users are told: Install Google Chrome v.X.X. Use it to access this site: http://xxxxx./ Do not use it for anything else. Do not update it. If my users were a captive audience, as might easily be the case, I see no reason to spend big bucks debugging 10 browsers. Just tell them what to do. Make it simple and unambiguous. Problem solved. In other words it all depends on which is the tail and which is the dog.

    --
    Social Credit would solve everything...
  87. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    >> Don't shoehorn
    Parent speaks the truth. At a certain level of complexity, write an app that runs on the local OS. Save the web based bits for focused applications.

    No offense to the OP, but even considering forcing a change of browsers on your users rather than learning to make the code work indicates he is in the wrong role.

    The best browser?

    "ANY"

    Forcing a captive audience to use browser 'X' may prevent them from upgrading in the future.
    If it means anything, I work for a multi-billion dollar company. My (mostly web-based) apps are used enterprise wide.

  88. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    But only a certain number of people can fit into your cubicle, and they may be stingy.

  89. Considered FileMaker by Apple+God · · Score: 1

    There will be many that will laugh at my suggestion, but take a look at FileMaker. You can interface with the database via PHP if necessary and also export to XML.
    You can script the database to print and email a PDF to customers or wherever it may need to go. I realize that you have a plethora of options besides FileMaker, just an idea

    --
    Women and Alcohol are good seperatly, but mix 'em and they turn you into a dumbass
  90. XML to Flash/Flex to Printer or PDF by Anonymous Coward · · Score: 0

    and no, my suggesting using Flash on a /. thread is not intentional flamebait.

    I am presuming from your explanation that:

    A. You can't just serve up a PDF directly (have to print from page)
    B. The fact that you are trying to force users to use any specific browser, let alone Opera, means you are desperate enough to do anything, even use Flash

    Truth is, if you want to render accurately from the browser, I don't think anything gives you the accuracy and simplicity of Flash. However, given that you went with ruby/rails means you are probably also the type of person who goes out of their way to make things harder than they need to be, so maybe simplicity isn't what you are looking for. Anyway, I would probably do something like this:

    1. Generate an XML feed with all the printing info, etc (optional but this is nice for structuring in Flash and gives you a nice feed to easily render to HTML if needed)
    2. Read that into a little Flash app that renders it in the page exactly like you need it to look
    3. Let them print it from the page or use AlivePdf (http://code.google.com/p/alivepdf/) to let them print/download a PDF

    That said, I am a Flex developer so I obviously have some serious character flaws and my advice should probably just be ignored.

  91. Re:but I thought HTML was supposed to fix all that by koreaman · · Score: 4, Interesting

    I would say about 75% of my time at work is spent working around inconsistencies and bugs in Silverlight. To be fair, I've only tried 3, not 4, but they really should have called it "Silverlight Beta 3", not "Silverlight 3". It works flawlessly cross-browser (with a few odd, rare exceptions), and it seems like a big leap forward from HTML/JS for this sort of thing, but I have to say it's not quite ready to compete with desktop solutions.

    However, if you absolutely must have it run in a browser and don't want to use hokey Java applets, Silverlight is something you should really look into.

  92. Re:but I thought HTML was supposed to fix all that by koreaman · · Score: 1

    You are basically describing Silverlight. (Or maybe, you are describing what Silverlight will look like in a few years, and what it almost is like today). Shame it's currently a buggy piece of shit.

  93. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    You'd think that, but in practice, it turns out that it's significantly easier to deal with the headaches of different browsers talking to one server than it is to deal with the headaches of supporting different client pcs. Figuring out, fixing, deploying and validating the fix for why Mary Sue in accounting has an app run not quite right is just harder than figuring out why IE6 doesn't render something right. You can just play 'count the support staff' to tell this - a server based app with 1000 clients can get by with one or two support people, while the same thing on 1000 desktops will need a whole team to troubleshoot and address individual problems.

  94. Re:but I thought HTML was supposed to fix all that by fm6 · · Score: 1

    "Plenty of offline applications?" Try almost all of them. People tend to associate Java with web applets, but that's never been more than a tiny percentage of Java applications. There are too many platforms that are better suited.

  95. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    Do you or do you not have a hammer?

  96. Internet Explorer is the Best. by rdebath · · Score: 1

    This is the kind of crap the IE excels at. Because you can ignore the browser, write a native APP and call it an ActiveX control. Of course, you'll probably be tied to IE because Microsoft are trying to kill ActiveX and IE version N+1 won't support it. Their current flavour is DotNET (silverlite) but that has built in obsolescence so you'll have another big upgrade in a couple of years. You might try Flash if you want native in a browser.

    If you want completely native in a browser and you can choose the browser you're better off using the Citrix client (probably in seamless mode) as your browser analogue. You could also roll your own pseudo browser if you have a mind to, it can be far far simpler than a real web browser because it only has to understand one language not the ten to twenty plus variations that are needed for a real web browser.

    Assuming you're fixed on a real web browser, the best one for applications is Google Chrome, that is what it was designed for after all (G-Mail, G-maps, G-Docs, G-ood, G-od). Printing may still be an issue as HTML can't do it, you can't even choose a proper CMYK print colour. A good solution would be some form of PDF download, possibly with an enhanced dialog giving the options 'Save, View or Print' so you can get 'single click'.

  97. Ew... native ftl by therealobsideus · · Score: 1

    Stick with a web application. As someone who worked in shipping, it is much easier to do your work. I'm just confused what this ticketing system is about? Unless you can do an AS/400 app (which is what I prefer).

  98. Re:but I thought HTML was supposed to fix all that by risinganger · · Score: 1

    and you're basing this on what exactly? Java enabled me to write an application that, except for a couple of issues over SWT, did indeed run as expected on multiple OSes, something that I seriously doubt would have happened without Java (based on the funding and manpower this project had). As for being a resource pig and unstable - if it's good enough to run bio-chemical simulations in I think it's good enough for the average user.

  99. Using XSL-FO for Print formatting. by Anonymous Coward · · Score: 0

    Not able to print is no reason to reject a browser. For Web based applications, Firefox, Explorer, Chrome must be supported.

    Have a look at Apache FOP or something to get the right print outputs.

  100. "Java is the network" by reiisi · · Score: 1

    I think the point he was trying to make is that Java's biggest selling point is that Sun really worked hard to make working with the network feel the same as working with the file system.

    (Not commenting on the relative merits, here. Too many underestimations in every technology I've ever worked with. Java is good for consistency, if you can put up with the overhead of detail.)

    --
    Computer memory is just fancy paper, CPUs just fancy pens with fancy erasers; the 'net is just a fancy backyard fence.
  101. "take away control" Mod that up! by reiisi · · Score: 1

    That is precisely what the problem is.

    --
    Computer memory is just fancy paper, CPUs just fancy pens with fancy erasers; the 'net is just a fancy backyard fence.
  102. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 4, Informative

    NONE of you posting in this thread section can read, obviously. The question is what BROWSER is best for complex web applications. It is NOT what programming/scripting language is best for making such applications.

    Heck, as wrong of an answer as it would be, "Internet Explorer would be best!!!" would be a better answer than the ones you all are fighting over. At least it's on the list of possible answers to the question.

    Someone needs to mod you all to Off Topic oblivion. There's nothing "Insightful" in you all not even remembering what the question was...

  103. Used properly, it does. by SanityInAnarchy · · Score: 1

    If your interface is complex, why are you using HTML/CSS/Javascript/etc?

    A better question might be, why is your interface complex?

    I do think HTML/CSS/JavaScript can handle complex interfaces, but I also think a complex interface is its own form of code smell. Sometimes you really need it.

    Why not take advantage of a more advanced and mature UI widget set, such as that provided by Java

    The JVM is a bitch to install, compared to a browser. (I know, it's easy. It's still a ridiculous number of steps compared to the "Get Firefox" links.) More users are likely to have a working browser already than a working JVM, let alone the widget set you want. And with a browser, you can gracefully degrade to whatever denominator makes sense, giving your users the ability to access the application from anywhere that has a decent browser (or not-so-decent, depending what you support).

    But both Java and browsers have an advantage over native (compile-once, run-anywhere) -- and the native widgets themselves, whether or not you're in a portable language, are not portable, so you'd want an abstraction layer (Qt, WxWidgets, etc) at some point, if you want a portable app.

    The web is about where MacOS was 20 years ago in terms of ability to deliver a rich application UI experience.

    Depends what you mean by "rich".

    In what other platform can you open multiple screens of an application in tabs, just by middle-clicking on the buttons (or 'links') to them? Or bookmark a chunk of the application (possibly application state, also)? Or script the application's UI, easily, even applying arbitrary customizations which apply to all applications?

    And that's just scratching the surface -- I'm not counting what you can do with APIs and "widgets" in the Web sense, or mashups, or feedback and real-time collaboration...

    Now, yes, you can add Web-like interfaces to native software -- the browser is, after all, a native app. But as you said, "don't shoehorn." At the end of the day, you may well have reinvented the wheel of the back button, forward button, hyperlink/tab UI, collection of bookmarks, easily zoomable text, etc... And don't get me wrong, that's not necessarily worse than reinventing GUI concepts like context menus (or lack thereof), keyboard bindings, menu bar, etc...

    But which of these is it going to hurt the most when it doesn't feel "right" and "native"? That depends -- I can see a Mac user being frustrated by something which doesn't use the system's menu bar. But I can also see a native Web user being frustrated when their Greasemonkey script won't run, or that they have to send a screenshot if they want to show something cool to their friend...

    I don't know that it's necessarily a step forward. I think it's a step forward for some things, a step back for others, and not entirely clear for most things.

    --
    Don't thank God, thank a doctor!
  104. I think you've got it backwards. by reiisi · · Score: 3, Insightful

    I really, really wish I could agree with you.

    But there's a fundamental problem. An intractible problem, even.

    Browsers simply try too hard to be all things to all people.

    That's an impossible task without making all people conform to your definition of all people. Woops, totalitarian dictators and religious idealogues keep trying that one and finding it doesn't work either.

    We should not be continuing to try to build or define the ultimate browser. We should, instead, be defining standards for browsers for specific application fields in specific countries.

    Open standards, not standards led by any industry leader or special interest group.

    Simple, standard browsers, implemented and implementable by small teams with unencumbered tools. With an overall API a single developer can grasp, and libraries that don't require teams just to find out where to find the answers.

    --
    Computer memory is just fancy paper, CPUs just fancy pens with fancy erasers; the 'net is just a fancy backyard fence.
  105. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 1, Interesting

    I would say about 75% of my time at work is spent working around inconsistencies and bugs in Silverlight. To be fair, I've only tried 3, not 4, but they really should have called it "Silverlight Beta 3", not "Silverlight 3". It works flawlessly cross-browser (with a few odd, rare exceptions), and it seems like a big leap forward from HTML/JS for this sort of thing, but I have to say it's not quite ready to compete with desktop solutions.

    However, if you absolutely must have it run in a browser and don't want to use hokey Java applets, Silverlight is something you should really look into.

    Silverlight is another proprietary piece of junk...it is not a web standard

  106. And by mahadiga · · Score: 1

    Why don't you offer your own browser to your complex web application to your customers?

    --
    I'd like to buy homeland for our 10 million people. http://twitter.com/mahadiga
  107. Re:but I thought HTML was supposed to fix all that by Pieroxy · · Score: 2, Insightful

    What are you smoking? The whole point of the web is that it can run on almost every platform out there. Phones, web tvs, Linux boxes, PCs, etc...

    Silverlight, as nice as it may be, will never be able to compete on that front. Look at where flash is today.

    As you say, if you absolutely must have it run in a browser, write it in HTML/js/css. That's what browsers understand.

  108. Re:but I thought HTML was supposed to fix all that by denmarkw00t · · Score: 1

    Java got a bad reputation, sure, but for good reasons. We used to deploy software to schools and it was a java web start app. If you had the right runtime, and you could deal with the mess of downloads and potential instability even in a compatible runtime, you'd get by. We finally decided to rewrite it in PHP and MySQL with Javascript for simple dynamic abilities and the process went pretty well, save for the XMLRPC calls that were dead integrated to the system and the poorly architecture'd database...but...

    Even at work now I have to do some work with Java apps - not developing, just using - primarily Eclipse. It's slow, bloated and just not what I'd prefer, but Salesforce offers that or in-browser editing - ewwww.

  109. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    You're an idiot, the only thing Java and JavaScript have in common is the word 'Java'.

  110. I second that strongly by Anonymous Coward · · Score: 0

    The The HTTP/HTML model is the worst thing that happened to GUI design since.. GUI design exists. It was designed to deliver documents with live links between them.
    Anything else is jury-rigged, shoehorned into a concept that doesn't support it at all, and therefore unwise.

    It's not a C/S platform! It's a document-delivery platform!

    I've done the Java thing, creating largish applets that *had complete client I/F*, the users didn't know what happened to them. They thought they were using a native app. I'm sure of this because the most frequent request I got for years, was to get rid of the "annoying extra border with the browser menus". But we wouldn't. because we'd have had to deploy the clients in a more old-fashioned way and the customer didn't want that.

  111. The question is wrong by mrjb · · Score: 1

    If you need to ask "What is the best browser for using complex web applications?", you're doing it wrong. Especially in "simple" business automation, any browser should be fine for any web application, the rest is done on the server side.

    Now that doesn't help you much, but you haven't given a lot of detail on the printing. I assume the thing you want to print is fairly complex. Browsers traditionally are more suited for on-screen rendering than creating print documents. If you really need fancy client-side printing capabilities, consider generating a PDF on the server side, then send that to the browser. Which one the client uses should no longer matter (much) then. Even Lynx is capable of receiving PDF documents.

    --
    Visit http://ringbreak.dnd.utwente.nl/~mrjb/growingbettersoftware to download your free copy of the book
  112. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 1, Interesting

    It is dated technology. In much the same way as Flash. HMTL5/CSS/JS can pretty much do the job now without having to be locked into an MS/Adobe technology.

  113. Re:but I thought HTML was supposed to fix all that by mcrbids · · Score: 2, Insightful

    Don't compare the weaknesses of AJAX against the strengths of client side developments without at least mentioning the other way 'round, mmkay?

    Client side applications have issues such as:

    1) System requirements! You have to have the right type of computer, with the right type of processor and/or O/S, etc. Don't have one? Well you are SCREWED. Porting a client application from one platform to another, even with a decent toolkit can be daunting. Even if the programming language supports cross platform development, does that "cross platform" part include Linux? What about QNX? What about the iPad? Browser-based computing eliminates most of this problem.

    2) Environmental differences! Software that works well on computer A might not run at all on computer B despite them being very similar because B installed a shareware program that updated some DLL. Good luck sorting that one out? Web-based applications don't really have these problems outside of the browser discrepancies that exist when you don't write an app with a decent abstraction API (EG: Prototype)

    3) Data locality! So you are at work, you save your file, and then you leave. Over the weekend you remember some detail that you want to bang into your document quickly before you forget. Don't have your laptop with you? Well, shucks! Web-based applications don't really have these problems, either. You might have trouble with Internet connectivity, but even in very rural areas this problem is disappearing rapidly.

    4) Cheap development! Web developers are easy to come by! The standards are open, the needs are many, and the work is easily commoditizable and thus hiring help isn't so difficult.

    --
    I have no problem with your religion until you decide it's reason to deprive others of the truth.
  114. Re:but I thought HTML was supposed to fix all that by dave87656 · · Score: 2, Informative

    The big difference is that all the browser has to do for java is host the runtime. For javascript, the browser has to support the entire instruction set. Java takes longer to start. But once it has started, it gives you much more control.

  115. Re:but I thought HTML was supposed to fix all that by dave87656 · · Score: 1

    Sheesh, this kind of attitude makes it pretty difficult for us Linux users. IE, Silverlight. C'mon guys, show some team spirit.

  116. Re:but I thought HTML was supposed to fix all that by dave87656 · · Score: 1

    I would not be surprised if the percentage of non-thin-client Java development (including but not limited to Swing thick clients) is less than 0.01%

    My app is written entirely in Java (MFG/Cust Service/Cash), 1.1 million lines of code. It is true that GUI bulders aren't very good compared to, let's say, Delphi, but Java lends itself well to code templates, which eases the burden, especially for an application where consistant look and feel is required.

  117. Re:but I thought HTML was supposed to fix all that by terjeber · · Score: 1

    I agree, and utterly disagree with you. You have to use the best tool for the job, and for complex applications, the browser simply is not the tool for the job. People advocating using Javascript, should be flogged and dragged backwards into 1972 and shown how a BASIC interpreter beats the living daylights out of the junk that is Javascript, mostly because BASIC of 1972 is honest about what it is and what it is not, whilst Javascript advocates actually think that horrible piece of junk is useful for anything real.

    Java applets and Silverlight are the - IMNSHO - real alternatives. Flex is OK, but it is still just Javascript on steroids, and that simply won't do for complex applications.

    One could argue that if you need the power of a real programming language you should not try to develop for the browser, but the browser is still a rather wonderful application delivery method.

    To the OP, go for Silverlight. There is nothing like it in the market today. Not even close IMNSHO. And that is from someone who is not particularly fond of Microsoft.

  118. Re:but I thought HTML was supposed to fix all that by dave87656 · · Score: 1

    t's slow, bloated ...

    Gotta disagree with you there. It used to be but not any more. It's no slower than any other app with the same complexity.

    If you had the right runtime

    If I'm not mistaken, can't you tell JWS to download and install the correct runtime if it is not installed?

  119. Re:but I thought HTML was supposed to fix all that by terjeber · · Score: 0

    Anyone stating that the whole point of something is one particular thing needs to grow up a little. The whole point of the web is nothing at all. The whole point of software development is to use the best tools for the job at hand.

    If you, for example, are creating an app that is to be used by a select group of people unknown to you, on unknown networks all over the place, then the web is a great app delivery platform. Say for instance that you need to distribute an app to all of your dealers, none of them actually owned or managed by you. Then Flex, Silverlight etc are excellent alternatives and generic web apps are an insane alternative. You are not trying to reach the population in general, you are trying to reach a select few of them with a very, very specific need, they need to be able to use your particular application. You'd be insane not to distribute it over the web and you'd be equally insane trying to develop it using "standard" web tools, since they are anything but.

    The idea that everything you do on the internet has to be available to every possible thing that can interface with said internet is absurd if what you are doing is only meant to reach a small subset of the internet population.

  120. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 1, Informative

    Should have used Adobe Flex, its way ahead of Silverlight and much more stable. It also has much better cross-platform support.

  121. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    Hahaha, I kid, I kid. If your interface is complex, why are you using HTML/CSS/Javascript/etc? Why not take advantage of a more advanced and mature UI widget set, such as that provided by Java or *shock* the native environment?

    The web is about where MacOS was 20 years ago in terms of ability to deliver a rich application UI experience. Google are excellent at marketing it as some sort of advance, but it really isn't. Don't shoehorn.

    I have written a large leisure centre management system entirely in HTML, CSS and Javascript . This included multi site, touch screen tills, booking sheets, member managment etc. They system was very customizible and could be applied to any* leisure centre. The inital client was a very busy leisure centre with 30 people coming through the door every 10 mins at peak time. The tills section had to be able to pop the money drawer, read from a swipe card reader and print to a receipt printer. I found Firefox excellent for this purpose. It's about:config section allows you to specify a separate default printer for the browser (by name string) and manage a huge number of variables (borders, paper size etc.) You can package the whole lot up using MCD (see https://wiki.mozilla.org/Deployment:Deploying_Firefox#Firefox_Customization_.28CCK_and_Repackaging_Tools.29). All that was required for IT support to set up a new point of sale terminal was to go to a URL, download the customized Firefox, set a shortcut on the desktop and voila, new POS terminal (nearly, but from a printing point of view it was good to go).
    Popping the money drawer required printer specific drivers capable of this (the drawer is linked through the receipt printer). And reading the swipe card reader required middleware to pass the COM port data into a hidden field on the page, which would work with any browser, however I found firefox the best for printer customization and repackaging customized printing options.

  122. Re:but I thought HTML was supposed to fix all that by terjeber · · Score: 2, Informative

    I could say I didn't want to burst your bubble here, but I do. Pop. Consider it burst.

    Try to do what most software developers do once. Go into a company that has very complex requirements for their application. Try to do it in any of the more popular web-technologies today, Richfaces, JSF, Struts (you can see where I am coming from I guess) and develop this vertical LOB app. Sorry to tell you, you will spend at least 5-10 times as much time to get it to work than if you use something like Silverlight or Flex and put a SOAP interface on your server. Not only that, but it will easily scale 100 times better than you can possibly manage with an app that keeps all state on the server including conversation state.

    In typical LOB apps you can easily cut network traffic and server hits by 50-90% over an Ajax solution by going with Flex or Silverlight. In most cases such things matter. Not for toy applications though.

  123. Re:but I thought HTML was supposed to fix all that by dna_(c)(tm)(r) · · Score: 2, Insightful

    Javascript is mature enough, it is the DOM that needs to evolve and be consistent over the different browsers. And CSS.

    Still, I'm not always convinced making everything a web application is an efficient choice...

  124. Server by Bert64 · · Score: 1

    Handle printing server side if you can, assuming your printers are all networked this shouldn't be difficult - especially if this whole thing is running inside of a closed network... The server can render the content appropriately and feed it to the appropriate network printer...

    I've never really tried printing through the browser much, what problems does it have?

    --
    http://spamdecoy.net - free throwaway anonymous email - avoid spam!
  125. Re:but I thought HTML was supposed to fix all that by FuckingNickName · · Score: 2, Interesting

    System requirements! Browser-based computing eliminates most of this problem.

    When degraded interface, latency of processing and (depending on who's deploying the servers) privacy aren't important... still often no. See the fine article for a counterexample.

    Even if the programming language supports cross platform development, does that "cross platform" part include Linux? What about QNX? What about the iPad?

    Linux - usually.

    QNX - with this RTOS built for embedded apps you clutch at straws. But there's a desktop environment and QNX 6.4 included an albeit non-current Firefox 3, you'll say, then 6.4.1 decided to include a Webkit port last year, you'll point out. Well, yes - tell me, have you tested a modern web app on QNX? Now what about a Java app, or an OpenGL app?

    iPad - Steve's a clever bastard, and has intentionally crippled this platform so you have the choice of either providing a degraded HTML/Javascript experience or developing for Apple's proprietary Cocoa framework. In this specific case, there's little developers can do except stop jumping on the shiny bandwagons Apple are driving toward the firing range.

    Amiga - I'm including this one because I think you forgot it. A recently released Timberwolf alpha (Firefox port) for AmigaOS surely has to be an argument for web apps.

    Environmental differences! Software that works well on computer A might not run at all on computer B despite them being very similar because B installed a shareware program that updated some DLL.

    Oh Christ, the horror of checking a DLL/so version and/or providing my own in the app directory! You're thinking of problems with DLL sharing and system DLL overwriting which were largely eliminated by Windows 2000. FUD is bad, ok?

    the browser discrepancies that exist when you don't write an app with a decent abstraction API (EG: Prototype)

    This? It's a combined utility and occasional kludge layer, like padding for a kick in the balls. Compiling 160k of fixup source to visit a web page - that's what I want my CPU to waste time doing!

    Data locality! So you are at work, you save your file, and then you leave.

    Yeah, you'll have that file stored on a company network server somewhere which you can access securely from a remote location. You'll also have a locally cached copy. This will all be set up in a few minutes as part of the equipment deployment process in any competent IT department.

    You might have trouble with Internet connectivity, but even in very rural areas this problem is disappearing rapidly.

    Argh. Most of the world is a very rural area, and it's not disappearing rapidly because there is no profit in providing cheap connectivity to very rural areas. It's not as if you have to go to a third world country - just the most densely populated country in Europe. I'm not buying a satellite phone for your stupid web app, thanks.

    Meanwhile, in the cities, (1) an business ISP can and will go down for a few hours (and routing be dodgy, and app servers have problems), and it'd be commercial suicide if your workforce suddenly couldn't do anything but twiddle its thumbs; (2) in general, disaster planning means you don't rely on global infrastructure and political stability except when you need to.

    4) Cheap development! Web developers are easy to come by! The standards are open, the needs are many, and the work is easily commoditizable and thus hiring help isn't so difficult.

    Ah, the "why choose Windows" argument. This isn't 1995. There are plenty of programmers available and proficient with common APIs beyond HTML/Javascript.

  126. Re:but I thought HTML was supposed to fix all that by FuckingNickName · · Score: 5, Insightful

    If an engineer is asked, "What is the best tractor for me to commute to my office every day in?" one of the first questions should be, "Why do you need a tractor?"

    Even if you find out that the man really needs a tractor and isn't just lacking knowledge of alternative automotive technologies, you'll have learnt more about his specific requirements in the process.

  127. PDF by joost · · Score: 1

    Many posters here are criticizing you for building a web app in the first place. Don't let them get you down. Doing this for the web is a great choice. Access from anywhere, cross-device compatibility put of the box, are just two advantages. And RoR is a great choice too, ignore the haters here who are afraid to think outside their comfort zone.

    Printing however is a different thing altogether. Browser support is pretty poor and inconsistent. Most browsers include header and footer, and you have limited control over the layout. So my advice would be to dynamically generate PDFs. I have done so myself and the results have been great. You can control every aspect of the print and a bonus is that the printout can be retained for later reference.

    A good library for Rails is prawn.

  128. Rethinking PDF Creation in Ruby by Wired+Earp · · Score: 1

    I am sure you will enjoy this Ruby-based, server-side PDF generator based on the Webkit rendering engine used in Chrome and Safari: http://thinkrelevance.com/blog/2010/06/15/rethinking-pdf-creation-in-ruby.html

  129. Advice on PDF Printing by Rafajafar · · Score: 1

    If you're going to print, use princexml.com's app. Create HTML documents which are converted to PDF on the fly.

    --
    Finder of the any key.
  130. Re:but I thought HTML was supposed to fix all that by FuckingNickName · · Score: 1

    So for your web app it's necessary to deploy with a customised configuration of a particular browser, eliminating one of the few advantages of web app development?

    Also, "30 people [making a simple purchase transaction] every 10 minutes" is not busy by computer or UI standards. People were interfacing their 2MHz BBC Bs (or substitute local 8-bit computer as appropriate) to tills and barcode readers in the '80s for this sort of thing.

    I'm not knocking your implementation, which might be very much fit for purpose, but I don't think it's an argument for web apps.

  131. Re:but I thought HTML was supposed to fix all that by tepples · · Score: 1

    The basic selling point with HTML apps is that you don't have to spend 30 seconds downloading and installing a small binary.

    A user might not be on a machine where he can install arbitrary binaries downloaded from the Internet. Either the user isn't the owner of the PC, in which case the user lacks administrative privileges and may be subject to Software Restriction Policies, or the machine has mandatory verification of digital signatures.

  132. Web applications shouldn't be built in HTML by Anonymous Coward · · Score: 0

    If I read those requirements, it looks like you absolutely need some kind of desktop functionality on the web. Well, the real answer is... to step away from HTML.

    HTML is great for websites - the kind that offer a lot of data for reading purposes: blogs, newssites, ... but HTML was never intented to be used as a bases for web applications - and shouldn't be.

    If you're building an application, you need a framework/set of tools/language that was meant for building applications with. That means: no HTML-based stuff. So: no PHP, no ASP .NET, no JSP, ...

    So, what are your real options then? In todays' world of Rich Internet Apps, it comes down to either Flash (Flex) or Silverlight. Main advantage? STATE.

  133. Re:but I thought HTML was supposed to fix all that by FuckingNickName · · Score: 1

    So HTML/Javascript is a good way of subverting "don't run your software on my computer without my permission" policy?

    Or is there some argument here that a browser environment is safe but any other virtual machine sandbox and the local user permissions system for restricting binaries are horribly insecure?

  134. GD by Anonymous Coward · · Score: 0

    I've found using the PHP GD Library to generate an image for printing is about the same amount of work as generating a PDF.

    The advantage is you don't need a plugin to print a JPEG, or deal with browser printing bugs.

  135. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    If you are going to use Silverlight, why use the web? Silverlight is not cross-platform. If you need all the things you say, native app is the only way to go. I do not consider a Mac port to make it cross platform. Mono is garbage. No Linux, No iphone, no iPad, no Android, etc... Silverlight is nothing but Microsoft's proprietary, patent encumbered play for the web. Many idiots such as your self are playing right into their super expensive, proprietary grip.

  136. Re:but I thought HTML was supposed to fix all that by thetoadwarrior · · Score: 1

    I'd rather someone use Javascript than infect yet another site with Silverlight.

  137. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0
  138. Re:but I thought HTML was supposed to fix all that by thetoadwarrior · · Score: 1

    I'd rather take 5-10 (even 20) times longer than use Silverlight and happily know it will work pretty much every browser and device.

  139. Use Web Engines not Web Browsers by lkcl · · Score: 1

    you might want to give serious consideration to creating an application that uses the web engine itself, directly, rather than relies on the broken-ness of the web browser "applications".

    two possibilities for you where you can start: http://wiki.python.org/moin/WebBrowserProgramming if you prefer python, or if you truly prefer ruby, try http://github.com/ppibburr/rbwebkitgtk which is ruby bindings to webkit *including* direct access to the 2,000+ functions of the DOM model.

    in this way, you can set up an application (ruby-gtk+ app) where you will be able to have your *own* menubar at the top - not the stupid web browser's one; on it, you would have a "Print" option which went and accessed the DOM model's "innerHTML", and you passed it to a *decent* printing system under *your* control, using whatever printing methodology is accessible to you via ruby, running on the user's machine.

    or python, if you prefer.

    this type of methodology seems to have been entirely forgotten about, as people scramble for conversion of complex apps to "entirely web-based" because they were convinced that "web 2.0 is Good and is God", and then run head-long into exactly the difficulties you're encountering, by which time it's too late.

    advice: bypass the web browser as a de-facto application, and create your own application still using the incredible power of web browser *engines*.

  140. Couple of ideas by Anonymous Coward · · Score: 0

    My shop runs a webapp that has various printing requirements, for which I've variously taken two competing approaches.

    1) HTML with all the CSS in physical units of measurement (cm/mm), or percentages where permissible. Work out page sizes that fall comfortably within the printable margins of whatever printers are used. Make sure content is constrained such that it won't overflow its containers. As an added bonus, I found an extension called jsPrintSetup for Firefox that lets you specify print settings (orientation, margins, zoom etc) in Javascript within the document - very handy if your colleagues like dicking around with these settings in the browser.

    2) Generate OpenDocument content when HTML's presentational capabilities aren't up to the job (especially when it comes to multi-page items). There are a few OSS projects kicking around for this, but none suited me so I did a fairly simple hack-job of creating template documents with placeholders for content, then running find-and-replace on the content XML file, zipping the document back together, and serving it up either as-is or via OpenOffice's own PDF converter (look for an app called jodconverter on sf.net).

    Hope this is some help.

  141. Re:but I thought HTML was supposed to fix all that by FuckingNickName · · Score: 1

    I'd rather take 10,000 times longer to make sure it works on every computing platform back to the hypothetical machines in Leibniz's 1666 De arte combinatorica. And don't get me started about difference engines! My team are working on porting and testing a cogs-and-gears implementation of Firefox right now - it'll take longer than just implementing the damn writeln('Welcome to the future!') natively but think of all the development time I'll save on future code.

  142. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    With regard to Google marketing HTML as capable of delivering a rich application UI experience, take a look at their Google Docs application. With the tremendous resources at their disposal, Google still cannot provide functionality present in the simplest of word processes (e.g., WYSIWYG printing). How do you think a small team with limited resources is going to fare when attempting to develop a rich GUI with HTML?

  143. Re:but I thought HTML was supposed to fix all that by jscotta44 · · Score: 2, Insightful

    The root of this story is about a guy trying to solve a specific internal application problem – not a widely distributed and publicly available application. And, he is writing the application in Ruby, which is good for web development.

    However, I think that I would have written a native application to the platform that they are using instead of a web application.

  144. Re:but I thought HTML was supposed to fix all that by koreaman · · Score: 1

    Thanks for the suggestion. I'll look into it if we start a new project, but I have a feeling my boss will want us to stick with what we know, which is Silverlight.

  145. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    It works flawlessly cross-browser (with a few odd, rare exceptions)

    Silverlight is cross platform? You forgot Linux. Fancy web developers always "forgot" linux. Haters.

    "So what!", you say, "Microsoft will throw a bone to Linux, sooner or later.".
    I have to boot my Wii, every time I want to watch movies with Netflix. Boot My !@#$%^ Wii.
    You don't know pain!

  146. Re:but I thought HTML was supposed to fix all that by koreaman · · Score: 1

    No need to get angry!

    And as a response, I'll leave you with this quote, that I ripped off from the sig of a fellow Slashdotter:
    "If I'd asked my customers what they wanted, they'd have said a faster horse." ~ Henry Ford

  147. Flexible Rails by Anonymous Coward · · Score: 0

    Why don't you stop worrying about browsers issues and design the UI in Flex and use something like AlivePDF to create simple PDF documents that you can print where ever and whenever. Flexible Rails implementations are quite easy to maintain and provide a rich feature set right out of the box. Also, both the Flex SDK and the AlivePDF API are open source.

    As much as the Apple Fanbois want to beat the Flash Platform down because Steve says so, it still is the only tool you have for consistent display and functionality across various browsers and platforms.

  148. Standard Print Model by jswinth · · Score: 1

    Only home users should be printing (usually PDF) via the browser. This is usually just some really big barcode where it doesn't matter if the layout changes.

    If you are trying to print precise documents then you will need to develop a printout direct to the printers. If you are issuing passenger tickets then I'd recommend an industrial printer like a Zebra. The printing language is not that difficult to learn and those printers will just keep printing for years day-in day-out.

  149. Re:but I thought HTML was supposed to fix all that by koreaman · · Score: 1

    You'll notice I said "cross-browser", not "cross-platform".

    I'm not a "fancy web developer" -- just a student with a temporary job doing some web development work. I use Linux every day in my free time. I know the limitations of Silverlight on Linux, but it sounds like the OP is in a locked-down environment where he gets to dictate even the browser version, so saying "hey, you can use whatever browser you want, but you still have to stick with Windows" seems like an improvement on his current situation.

  150. Re:but I thought HTML was supposed to fix all that by deroby · · Score: 1

    The question then becomes : will the customer / client be willing to pay 5 to 10 (let alone 20) times as much so it runs on hardware he doesn't care about ?

    --
    If there is one thing to be learned on slashdot, it has to be sarcasm.
  151. rbq by Anonymous Coward · · Score: 0

    Deliver WebKit rendered PDF for print (http://github.com/jdpace/PDFKit) and make the rest run in every modern browser.

  152. Re:but I thought HTML was supposed to fix all that by rufus+t+firefly · · Score: 1

    Also GWT is another alternative to plugin-dependent and OS-dependent solutions like Flex and Silverlight. It has great development support, even down to WYSIWYG design using Eclipse, and has the benefit of code written in Java compiled into Javascript/DHTML to work across modern browsers.

    Also, I'd recommend Chrome for testing. It's very fast and has a nice profiling extension available for it, as well as a GWT-specific development extension.

    --
    "He may look like an idiot, and talk like an idiot, but don't let that fool you. He really is an idiot." - Duck Soup
  153. Re:but I thought HTML was supposed to fix all that by rufus+t+firefly · · Score: 1

    You could probably use NoScript or its equivalent in other browsers to keep web-based application from running on your machine based on domain.

    --
    "He may look like an idiot, and talk like an idiot, but don't let that fool you. He really is an idiot." - Duck Soup
  154. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    Yeah because obviously the current web standards are working pretty well for this guy when no browser can figure out how to implement the same functionality across versions. What web standard should he use? While the W3C dick around negotiating with the community over codecs Microsoft defined and released 4 versions of Silverlight.

  155. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    WRONG. The WHY question was answered. To run Complex Web Applications. Your analogy would only work if the initial question was very general: "which browser is best for me to use the Internet with?" "What are you trying to do on the web?" "Use/run complex web apps."

  156. Generate PDF and then print that by DickBreath · · Score: 1

    I have developed an application with lots of jQuery on the browser and Java (Stripes) on the server. I use JasperReports to generate a PDF on the server and then send that to the browser with a Content-Disposition header to cause it to download. Browsers typically offer to save or open it. Once open in an application (example Acrobat Reader) it is simple to print.

    --

    I'll see your senator, and I'll raise you two judges.
  157. holy shit tl;dr comments by milkmage · · Score: 1

    did anyone answer this guys question?

    if you manage to see this.. check to see if your client has logs (and browser usage stats). cater to the largest segment.. maybe the top 3

    unless your client is ok with forcing a browser on their customers.. it's your job to make the site work in the ones that are used the most.

    since you said freight and passage, I'm thinking your client is a commercial shipper moving bulk freight.. not tins of cookies for the grandkids.

    that said, the browser distribution will probably be narrow (corporate clients) vs. every grandma's browser. unfortunately.. commercial clientele probably means ie6 is going to be in that top 3.

  158. Re:but I thought HTML was supposed to fix all that by Imagix · · Score: 1

    You apparently can't see the forest for the trees. Car analogy: What is the best car for me to use to go pick up a newspaper 15m down the street? None of them. It would be better to walk. The OP is asking which car to use, and everybody else is suggesting that the OP uses the footsmobile.

  159. Re:Lynx!--Mod parent up by inca34 · · Score: 1

    I am not sure why this was modded funny in such a serious debate over sensible browsers *s*.

    If your web page does not work in Lynx, perhaps you should reconsider your basic assumptions, including using the web to deliver the user experience for this application.

    Cheers.

  160. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    If your interface is complex, why are you using HTML/CSS/Javascript/etc?

    Because these days 1) I can and 2) it works.

    Why not take advantage of a more advanced and mature UI widget set, such as that provided by Java

    1) Ever tried to get a user to use Java apps? Ever been a user trying to get different Java apps to work? App1 requires your system's Java be version 2.5, no higher or lower. App2 requires your system's Java be version 2.6, no higher or lower. And don't get me started on load times.
    2) Java apps look a lot less advanced and less mature than what's on the Web these days.
    3) I do not want to write 200 lines of code in an API I'm not familiar with to only start up the program.

    or *shock* the native environment

    1) My native environment is not the native environment of my entire customer base, and I do not feel like porting apps between Win32, Cocoa, and GTK.
    2) I do not want to write 2,000 lines of code in an API I'm not familiar with to only start up the program.

  161. I assume... by Anonymous Coward · · Score: 0

    ...that you are also versed in using a "Manchester Screwdriver".

    As mentioned above - you should be coding your web application, preferably using validated web standards, so that the application works with the broadest set of browsers possible. Not optimising for a single browser - you are lowering the number of potential customers before you start. No, most people won't start installing old versions of some obscure browser to try your application, they'll just use your competitors product that doesn't have such ridiculous limitations.

    For printing, use a format that is optimised for printing rather than displaying information in randomly sized browser windows, such as PDF.

  162. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    Silverlight may just be that.
    BUT* that is not what this is all about. There is a reason we're cramming EVERY GOD DAMN THING into a browser. I regular forget what that reason is, however i think its something about akin to javas write-once-run-everywhere, where your fine silverlight is quite the opposite, write once & submit your soul to microsoft. Anything "standard" coming out of MS is a contradiction period. The whole concept of silverligt is stupid beyond beyond.

  163. PDF by Anonymous Coward · · Score: 0

    Generate PDF with something like HTML2PDF, print PDF.

    In ruby, there's sublog, easy pdf, prawn, whatever.

  164. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    rewrite it in PHP? That's retarded. Masses of web developers are flocking away from php, because it's code is unmanagable, inherently insecure and lacks bunch of enterprise features. Sure you can have nice productivity in PHP, but that's effective only for small enthusiasts projects and not full-blown web application.

  165. The Browser Your Users Use is the Right Browser by billstewart · · Score: 1

    He's Doing It Wrong. If your application only works when the user is using WhiffleBrowser Version 4.2.1 Patch Level 3, then it's not useful unless the user installs that exact browser. The point of developing web-based applications is that your users don't have to install and maintain *your* software on their desktops, you display your material using a common standard interface, and the user displays it the way they want, whether that's on a desktop just like yours or an iPhone or a 1080p TV screen, and whether they're using the same fonts you've got or using 36 point font because they've got vision problems.

    So you need to support the browsers your user base uses, whether that's (arrrgh!) IE6 (which is still the only browser my corporate IT department supports) or Firefox (where you should be able to expect a recent version) or Safari (because almost every company has Mac users even if Corporate IT doesn't support them) or whatever, and it should work on all of those browsers.

    If you really need to produce a precise image usable for printing ink marks on dead trees in a particular layout independent of printer resolution, you need to output your image in a language designed for that, which is Postscript; if you don't need to be printer-resolution-independent, you could also do PNG/JPG/etc. HTML isn't designed for that, it's designed for letting the user present the information content any way they want to.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
    1. Re:The Browser Your Users Use is the Right Browser by Jane+Q.+Public · · Score: 1

      You argue against yourself. I spent a lot of time on a "modern, 2.0" website, and cross-browser functionality is still a pain in the ass despite the standards. And try to use newer features, or even current HTML, then back-port it to IE6 and make it look/work right? That's close to double your UI development time.

      Granted, he could and probably should make it "standard" so that it looks and works the same on just about any browser except IE6, but on any new application I would draw the line there. I would not spend the time and money to support a browser that has been dead for years but just doesn't know it yet.

  166. Does Silverlight work in iPhones? Linux? Macs? by billstewart · · Score: 1

    If the browser has to display your content, you need to hand it content in a format your user's browser can display. Use whatever language you want on the back end (as long as it's supported on the servers you'll be running on), but you need to be aware that the user isn't necessarily sitting at a desktop with a big screen and the browsers you're supporting.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  167. I'm using IE6, You Insensitive Clod!! by billstewart · · Score: 1

    Yes, I know, my corporate IT department should be supporting something much newer than that, but they don't. So if I were being a good boy and not installing Firefox on my machine (so I can get some actual work done), or Safari and Chrome (to play around with) I'd be using it right now. I think it has CSS, but certainly not HTML5.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  168. Re:but I thought HTML was supposed to fix all that by FuckingNickName · · Score: 1

    No, that's analogous to answering, "Because I live on a farm," to the question, "Why do you need a tractor to drive to the office?" So you've invested in farming equipment already; this doesn't mean you need to use farm equipment for everything.

    The submitter is complaining that he can't get printing working as expected, or even uniformly, across browsers. Yet his request includes unexplained constraints which severely limit possible solutions: IOW, he's asked, "best browser?" rather than asking, "best solution?" Moreover, since he's omitted the information which explains why nothing can be changed but the browser we would be foolish to think we have a sufficient picture to recommend a particular browser.

    Maybe there's no budget to re-architect your whole system, but perhaps the correct solution is to stop making yourself a slave to the limitations of HTML/Javascript and HTML/Javascript clients? PDF has been suggested, as have various other plugin techs which may interact better with the printing environment.

    If you're going to be a slave to religion, at least let it be based on morality rather than tech marketing. Or maybe this sort of devotion is more benign ;-).

  169. Re:but I thought HTML was supposed to fix all that by FuckingNickName · · Score: 1

    Ever tried to get a user to use Java apps?

    I could be a smartass and just link you to a page with a Java applet. What's that? not everyone has downloaded a JRE? Well, the majority of the world haven't downloaded a decent browser either - and at least the Sun JRE has official MSI support for enterprise deployment.

    If you're looking for app installation via the web, the Sun packaging system is Java Web Start, and has been since 2001. Oh, which automatically installs a JVM if you don't have one...

    App1 requires your system's Java be version 2.5, no higher or lower.

    ...and supports multiple JVMs, for those cases where - like the article submitter with Opera - later versions of the platform don't work. You do realise that "your system's Java" just means a few environment variables to point to the default JVM, yes? You can have every JVM version ever built installed simultaneously on your machine if you want.

    2) Java apps look a lot less advanced and less mature than what's on the Web these days.

    You don't know what you're talking about, sorry. Java can use native UI widgets via SWT (or AWT, but that's old) or be skinned in a couple of lines with Swing to appear as whatever widget set you enjoy. So, unless you're claiming that the web somehow deploys a richer set of UI widgets than native mainstream clients - are you? - no.

    Hardware-accelerated 3D on top of OpenGL or DirectX has also been a feature of Java for a good decade now. Nice to see that's just appearing in experimental nightly builds of web browsers over the last few months!

    1) My native environment is not the native environment of my entire customer base,

    Why does it matter what your native environment is? Is this the same argument Microsoft used to get people to switch to NT in the '90s? "Oh all your lazy developers/IT staff will already know it. No need for expensive Unix guys etc."

    and I do not feel like porting apps between Win32, Cocoa, and GTK.

    Well, we wouldn't want to hurt your feelings. Writing a presentation layer which fits in nicely with the user's environment is surely something for liberal-arts types. What was Kay even thinking?

    2) I do not want to write 2,000 lines of code in an API I'm not familiar with to only start up the program.

    I'm almost wondering whether you've ever written a single GUI program for a modern platform at this point ;-).

  170. Re:but I thought HTML was supposed to fix all that by Pieroxy · · Score: 1

    While I agree with you that the point is to get the best tool for the job, I think you got it backward.

    Say for instance that you need to distribute an app to all of your dealers, none of them actually owned or managed by you

    If they are not owned nor managed by me, the worst possible solution is to commit myself to one technology which I have no idea if they're equiped with. The best I can do is to cater for the lowest common denominator: Pure HTML+CSS+JS, retro compatible down to IE6. That way, I have a good confidence in the fact that they will see what I have to show.

    As a general rule, if the job is to deliver an app to people I don't manage, then I cannot make any assumptions about the technology they have at hand.

    Now on the other hand, if I am sure my users are under windows with an up-to-date system, then I can use Silverlight. If they all have Macs, I can cater to Safari. And when I have multiple choice, then I can find the best tool for the job.

    If I have to serve all my partners, all my clients or any other group of people/companies that may change over time, IE6+/Safari is pretty much my only choice.

    The idea that everything you do on the internet has to be available to every possible thing that can interface with said internet is absurd

    Google pretty much does it. Is Google absurd?
    Not every app has to be about bells and whistle. HTML 3.2 and a good network pipe can do many many things.

  171. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    Or better, use any browser you like. Don't depend on the client side for anything. Create print views by generating PDF files on the fly, use no javascript (or minimal and verify it works in all browsers that support js), and do everything server side.

  172. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    Then the browser I would recommend is a John Deer.

  173. Re:but I thought HTML was supposed to fix all that by FuckingNickName · · Score: 1

    Google pretty much does it.

    No - only Google search just about works on every device. Gmail, for example, degrades ungracefully and doesn't work on my old Nokia. Their Apps degrade pretty much not at all.

    Google know that they'll not be able to deliver their products to all devices, and this is why they very publicly denounced IE6. Indeed, it'd fly in the face of rampant progress for its own sake to worry about compatibility with something too small or too old (MS and various Unixes are stuck with that pesky and necessary job).

    Their business goal is to get as many people as possible to hand control over to them: they'll pay precisely as much lip service to universal availability as convinces the guy who might be foolish enough to move from MS Office to Google Apps, but there is neither philosophical nor deployment proof that they're aiming for it.

  174. Just printing? by daeglo · · Score: 1

    If your problem is with the way the browser lays out the print, how about using a server side library to translate the reports to pdf, png, svg, or some other predictably printed form? If the prior is not a possibility, then there is always the option of a separate print stylesheet which uses nothing but absolute values, such as mm, in, or pt. Be sure to use the same measurement system for ALL components, and do not rely on margin, border or padding. Also, stick to only known and common fonts likely Times New Roman, Helvitica and Courier New. This will make your print outs fairly consistent between browsers (at least those which support the separate print stylesheet).

  175. Re:but I thought HTML was supposed to fix all that by Jane+Q.+Public · · Score: 1

    Totally disagree. Using Ruby and Rails (or one of the other popular frameworks, depending on the specific task) you will get more done a lot faster than with Flex and its javascript-like syntax.

    Aside from my personal experience, there is that (by now years-old) video where a guy builds a complete database-enabled blog using RoR, from the ground up, in 15 minutes. Do that (or something like it) with Silverlight? Flex? No way.

    Having said that, and given that I don't know any more about this guy's requirements than anyone else here, I still think Flex might be a viable option.

  176. Re:but I thought HTML was supposed to fix all that by terjeber · · Score: 1

    You really should read what you respond to before making a fool out of your self.

  177. Re:but I thought HTML was supposed to fix all that by terjeber · · Score: 1

    You really need to read what you respond to. Who cares which browser it works with if you are building a vertical LOB app?

    Only an utter fool would let religious views like this come between him and the timely delivery of the application the client needs.

  178. Re:but I thought HTML was supposed to fix all that by terjeber · · Score: 1

    But of course, you see, all clients are infected with exactly the same absurd religious views that the poster you responded to. The client couldn't care less what it costs as long as it works well in Lynx.

  179. Re:but I thought HTML was supposed to fix all that by koreaman · · Score: 1

    Google has a lot more time and money than 99.9% of companies in the world. Saying "Google does it -- why can't we" is ludicrous.

  180. Re:Does Silverlight work in iPhones? Linux? Macs? by terjeber · · Score: 1

    If you are developing a complicated LOB app you can more often than not define as a requirement which browser the user is to use. These applications, though available over the net, are not meant for general consumption.

    99% of the time however you will be faced with the: "It has to work in Internet Explorer 7 and also maybe in Firefox. It has to run on Windows". Again, we are talking about LOB apps here, the bread and butter of the vast majority of software developers out there, and those are not for general consumption by the internet population at large.

  181. Re:but I thought HTML was supposed to fix all that by terjeber · · Score: 1

    If they are not owned nor managed by me, the worst possible solution is to commit myself to one technology which I have no idea if they're equiped with

    Actually. No. It is not. If, as is the case for most of these situations, they need to use your app to get access to a service or product you deliver and they depend on, then you can easily determine what they need to run the app. This has always been the case, but before the net the usual method was to ship them a CD (or tape if you are as old as I am) and have them install it. Having a requirement like: "A Windows or Mac computer with 1G of memory and a 1024 by 768 display possibility" is not a problem.

    The purpose of the net here is the delivery of the app and the fact that you do not have to become their IT manager just to make it run. I have worked for companies who had 5-10 dedicated engineers who spent all of their time supporting the dealer chain maintaining the supplier provided software. That is not an issue when you can deliver using a browser, and "Windows or Mac bought some time in the last five years" is not a requirement you have to worry about.

    then I cannot make any assumptions about the technology they have at hand.

    Sure you can, you can even put it in as a requirement. Something like: You wanna sell Ford cars, you need a Windows or Mac computer bought later than 2005 with Windows XP, Mac OSX or better.

    Google pretty much does it. Is Google absurd?

    Google has to cater to more or less everybody. An LOB app developer doesn't care about anyone except the small group of people who are to run his app. That group of people can be given a set of requirements and then all is well.

    The system that these Silverlight or Flex apps are replacing are custom solutions on, for example, Sun or IBM hardware that previously had to be managed by this client. Using Silverlight or Flex he can now keep all his engineers in-house working on real solutions rather than run around his dealer network managing the AS/400 systems he previously had installed with them.

    The fact that Silverlight in the long run keeps his network traffic and server load at about 10-20% of what a standard Web app would do is just an added bonus.

  182. Use a web browser component by GWBasic · · Score: 1

    Write a lightweight desktop application that uses a browser component / rendering engine of your choice. Encourage your users to use this application when they hit areas that aren't cross-browser compatible.

    Most web browsers offer the browser as a component that can be embedded into a traditional desktop application. For example, in C# / .Net, there is a WinForms web browser component that uses IE. (The same program will use Mozilla when run under Mono on Linux.)

  183. Re:but I thought HTML was supposed to fix all that by terjeber · · Score: 1

    Aside from my personal experience, there is that (by now years-old) video where a guy builds a complete database-enabled blog using RoR, from the ground up, in 15 minutes. Do that (or something like it) with Silverlight? Flex? No way

    No problem. Have done it several times. You can watch the following set of videos where the guy creates a SOAP enabled server app with a relational database, including what amounts to a reservation system, a management system etc, in what amounts to far less than an hour of work.

    The videos are somewhat longer than 15 minutes, but they are educational not demonstrations.

    I agree that RoR is a great tool and I have done a lot of work with it. I have even done quite a bit of work with Flex on Rails which I would heartily recommend (I didn't do any of what's on the site, just used their excellent book) - apart from the fact that Flex is not 100% appropriate for REST apps (at least not the previous version, I have not tried the latest). Until earlier this year, for complex business apps, Flex and Rails was in fact my tool of choice for such apps. The reason I used Flex was that it gave both an advanced UI (of the type that can not be accomplished with Javascript) and it dramatically reduced network and server load. AJAX-based Javascript apps hit the server way too much.

    With the release of Silverlight 4 Microsoft leaped far past Adobe though. C# is a much better environment than is Actionscript.

    I still think Flex might be a viable option

    If you think Flex might be a viable option, give the videos above a whirl. Make sure you get the MVVM video too and compare the utter simplicity of Silverlight compared to a Flex app with Cairngorm. If you have any experience with delivering LOB apps where integration is paramount (think SOAP) the videos above should perhaps not blow, but seriously rattle your mind.

  184. Re:but I thought HTML was supposed to fix all that by tepples · · Score: 1

    So HTML/Javascript is a good way of subverting "don't run your software on my computer without my permission" policy?

    The effective policy is "You are permitted to run any software as long as it's HTML/JavaScript." This is the policy in a lot of Internet cafes, and it was the policy on iPhone OS 1.x.

  185. Re:but I thought HTML was supposed to fix all that by FuckingNickName · · Score: 1

    Yeah, when you start doing a Jobs and making software execution policies purely based on language / API rather than some administrative principle, you're either a petty bureaucrat or have some ulterior motive. The correct place to do business is elsewhere, and developers should avoid tying themselves to your rules.

    For example, Google ostensibly blamed IE6 for its data leak and its moving away from Windows is nothing but PR. But what it should be (and is, I'm sure!) doing is looking at its gateway boxes to find out why the leak wasn't picked up before it left Google's network. A client PC is always going to get compromised if someone tries hard enough, but the same does not apply to transparent traffic sniffers at the border.

  186. Re:Lynx!--Mod parent up by amicusNYCL · · Score: 1

    My "web page" "works" just fine in Lynx, there's a helpful message telling the user about the technologies needed to use the application hosted there.

    Surely you're not under the assumption that there exist people out there who use no browser other than Lynx?

    --
    "Our two-party system is like a bowl of shit looking at itself in a mirror." - Lewis Black
  187. Re:but I thought HTML was supposed to fix all that by SausageOfDoom · · Score: 1

    Exactly. If you start developing for and/or specifying a browser, let alone ridiculous point versions, you're doing it wrong. Just look at what has happened with organisations needing to keep IE6 running so they can continue to access their intranet. No. Just don't do it.

    If you absolutely have to control how it looks when you're printing, get your server-side application to spit out an image or a PDF.

    But something about this sounds like you're doing it wrong on a more fundamental level. It sounds like this is for a closed corporate network? If that is the case, and you're trying to build something that looks like a desktop application, that feels like a desktop application, and which prints like a desktop application, maybe you should actually be building a desktop application?

  188. Re:Lynx!--Mod parent up by inca34 · · Score: 1

    Indeed there are such people who will only resort to an outdated version of Firefox when lynx fails. I used to think that this was misguided or Luddite. Though I have come to appreciate the simplicity of user interfaces, especially those that work with lynx. The basis for my appreciation stems from technical uses of the web, typically involved in some sort of literature search, which were faster and easier to do using the lynx/telnet interfaces.

    Someone above has been posting about focusing on the best user experience as opposed to just using web interfaces for everything. I am not a web developer but this intuitively makes sense to me as a web user and hardware developer. If we use the right tool for the job, it shows in the end via ease of use and quantity of use. Cheers

  189. Hi OP, prepare for your first failure by Anonymous Coward · · Score: 0

    You're entire story reeks of amateurish unprofessional childish behaviour.

    Ruby On Rails? Seriously? Who the fuck uses RoR for anything at all, at any level, ever?

    In fact, I strongly suspect RoR was created by an epic troll just so he can lol @ slashdot posters who claim to be building serious projects in RoR.

    Next, it seems like you are relying on html for printing? Can you spell FAIL? This is often the mistake of someone who comes from a non computing background or completely misses the point of html. html is a pile of shit designed to make your computer display look pretty. It has zero (YEs, really, ZERO, none, nothing zip, zilch) use when dealing with paper formats. Anyone who tries is showing how fucking incompetant they are.

    In fact, why the fuck are you even implementing this in a web application? Is it that you are full of shit, and you aren't a programmer nor an analyst, and can't design a computer program, but you can fudge your way through a web application?

    To me, you are like this group of "people" i used to know around a decade ago. Linux "experts". sold crappy bug infested unscalable php apps to businesses under the guise of the web/intranets etc. Migrated to RoR.

    Complete amateurs the lot of you.

    In future, ignore what language slashdot tells you to use.

  190. Our experience: break it into 2 problems by Anonymous Coward · · Score: 0

    In a previous job we developed an online ticketing system and discovered the same issues.

    We solved the problem by breaking it into two scenarios:

    1. "Official printed ticket" - Tickets printed by the Promoter were done on the local system and directly spooled to an appropriate printer, which is in a well controlled environment. "Official tickets" were then all consistent and could be easily identified.

    2. online tickets, where we couldn't even control the browser, let alone printer settings, paper etc we did via PDF. We also supplied a simple HTML alternate with a barcode in a graphic image for those who couldn't/wouldn't use PDF. It wasn't pretty but was able to get through just about any browser printer combination out there.

  191. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    Applets are fast? Once they're running, they're adequate, but waiting for Java to actually start up on any machine I've tried it on is one big 30 second turn-off. JS has its limitations too, but startup time is not typically one of them.

  192. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    There was a time when software development was more than just 'coding' and somehow independent from the programming language eventually used. Following that idea it was possible to develop and design software that actually was portable (*gasp*!) and to a significant degree independent from the platform/OS/framework it was programmed on (*gasp*!).

    The idea was to first design the software following conceptual patterns (e.g. object oriented, service oriented, functional, procedural, separation of data dn presentation) and then write the code. Imho this still is a brilliant idea if the software is to survive longer then three years or you are liable to bugfixes/uptime... And it also would allow you to skip the incompatible browsers and switch to a 'offline' concept w/o huge cost.

  193. Re:but I thought HTML was supposed to fix all that by eihab · · Score: 1

    Just because you're familiar with hammers doesn't make them the best tool for all possible jobs. Sometimes you would be better served by a saw.

    The poster said he's fairly new to web applications development, so I wouldn't even say he's familiar with hammers.

    Printing on the web is not really that bad, unless you need pixel perfect accuracy.

    To the poster, if you need that kind of control and "CSS accuracy" then you're SOL as all browsers have their own CSS/printing quirks and you'll be in a world of hurt going down this path.

    I think your best bet is to do this on the server side and serve something more appropriate like say a PDF. There are libraries out there that generate PDFs from HTML/CSS (dompdf in PHP for example).

    They have their own shortcomings (e.g. dompdf doesn't respect vertical-align on table cells and even crashes when you have a table element that spans more than one page), but at least you'll know that the output will be consistent across all browsers/platforms and will be printed as such.

    You could of course go gung-ho with postscript and create PDFs without the HTML/CSS translation mess. Your data and application logic are separate from presentation, aren't they?

    --
    If you can't mod them join them.
  194. IE6 FTW or your fired by dougsk · · Score: 1

    IE6 FTW or your fired. Seriously. Thanks, Your CIO

  195. Re:but I thought HTML was supposed to fix all that by Antique+Geekmeister · · Score: 1

    I'm basing it on the last 5 years of very painful experience with unstable "Java" graphical applications. I suspect, and observed in two cases, that the developers were excited and believed that it worked. In most of these cases, the actual clients became increasingly unhappy, and I'm working with two major projects right now to throw out the Java client and make it a clean, web-based interface.

    And before you applaud its use for bio-chemical simulations, I strongly urge you to speak to some of the programmers who actually understand programming, not merely biologists who took a course in programming, to find out what sort of absurdities are occurring. There's a tremendous amount of biological number crunching for with software that cost incredible hardware and computing time resources to run, but are so buggy that they should never have been released. There are numerous reasons for this, but the essentially mistaken or sometimes even fraudulent claim that Java run on two different machines or on two different days with normal Java updates will produce the same data is at the root of much of it.

    Java's multiple layers of inheritance and localized re-interpretation of basic functions creates a stunning stability problem for reliable number crunching, one which I just don't see as addressable.

  196. Firefox, Chrome, IE 7+ and Safari MUST WORK by CodePwned · · Score: 1

    If you write any web application and any of the above 4 fail you fail. There is absolutely NO excuse for any application to fail due to a browser. 99% of the problems are CSS related and you doing something that isn't supported in slightly older browsers.

    If you want to do the latest and greatest techniques for a system many people will use either do it in flash, or make sure your techniques work in all browsers. What you are doing should has no reason to be complex. Remember your audience, remember your users... I hate base text stuff... but flash and "neat" looking techniques are not needed in any ticketing system.

    KISS - Keep it simple stupid.

  197. Errm..., Sorry, wrong approach. by Qbertino · · Score: 1

    Like others have pointed out: You're screwing around. If you have to develop an internal rich client, chose one (1) cross-plattform browser to develop against and go for it. Whenever the app breaks, fix it, so that it smoothly runs in said browser. And I really would recomment Firefox, as Opera is closed source. If you want pixel-perfect printing you're outa luck. This is the web, n00b, and 1on1 dynamic clientside printing can only be done relyably with Flash. Which even I, as a very experienced full time Flash developer, wouldn't recommend! It's overkill for what you're doing, and actually quite restricted in its results (precompiling of templates required, for instance).

    Use OpenOffice and the CLI connector on the serverside. Build some Templates in RTF, using OpenOffice, load the generated outputs in OO and export PDFs from that. Send those to the client. That sounds like a bizar hack, but it actually is the smoothest way to takle this problem and your customers will be happy to be able to edit, change and add printing templates later on. And you can actually test your print layouts and generators manually, as it is, well, OpenOffice. Duh.

    Otherwise quit screwing around and stop chasing waterfalls. One browser, one Ajax Framework and Printing via Serverside PDF Generation. For Ajax check out Tibco GI if this is a non-trivial Business Web Application. GI is basically Swing Components in Ajax on Crack, and thus only runs on current versions of I.E. (juck!) and Firefox. Very restricted in that way, but very powerfull and extremly fast to develop business frontends in. The IDE & drag'n'drop Builder are actually written in Ajax themselves - you launch the IDE by loading a html page from your local GI Builder directory into Firefox (No joke!). And since you're going for a single browser anyway, you might aswell reap the benefits. No more fiddling about with jQuery or other x-browser Frameworks. Not the worst Idea for building complex Inhouse Apps, imho.

    Good luck. Sounds like you've bitten of quite a lot. Hope you can chew and swallow. ... And that your customers are paying a fair price.

    My 2 cents from a professional Rich Client developer.

    --
    We suffer more in our imagination than in reality. - Seneca
  198. Solve a different problem by devjj · · Score: 1

    tl;dr, but: No browser today does printing really well. If you want to accurately get out of a web browser what you see in the web browser, your best bet is to effectively generate documents that are native to paper, like PDF. Tell your devs to look at PDFKit. It uses WebKit to generate PDFs on the backend. Built in Ruby and includes Rails integration and a Rack Middleware. Works as advertised.

  199. Re:but I thought HTML was supposed to fix all that by bitt3n · · Score: 1

    Maturity isn't defined by the number of years since conception, but by its origins and the development and engineering which has gone into it since.

    just keep in mind that this argument sounds a lot more convincing in the back seat of your car than it does when employed by your public defender

  200. Stupid Idea #426 by Ritchie70 · · Score: 1

    l admit I'm having a hard time fully understanding the question, but if this is an internal app for a single (small sounding) company, presumably on a web server on the LAN, could you just print from the server directly to a printer and not have to screw around with any of this web stuff?

    So far as what browser, pick either Firefox or IE (or Safari if it's an Apple shop, which seems unlikely) and make it work there.

    If this is a big company, pick IE, because they're not gonna let you install Firefox on all their workstations.

    --
    The preferred solution is to not have a problem.
  201. LaTeX and Firefox by Pirulo · · Score: 1

    If the app runs inside a controlled environment, use Firefox, the only true cross-platform browser (Chrome is there too these days).
    for totally controlled printed output go LaTeX, buy the books, read the tutorials, invest the time. It is worth it.
    I didn't use the rTeX plugin due lack of certain features, (double parsing for pagination, etc). I just went wit flat Erb templates evaluated on the fly, yes, using RoR too, and I am very happy with the results (it's used for a medical application that produces thousands of complex documents per month).
    I got to pick a browser too, the only one that run everywhere was Firefox at that time, thus saving resources in thinking only about compliance with standards.

  202. the nature of the beast. by Anonymous Coward · · Score: 0

    All browsers have inconsistencies, and all of them have good points and bad points, there is no Best browser, as least from a developers perspective. As a few users have mentioned pdf's, etc. are consistent, but using DOCTYPE and having a simple variant of the page for printing is also a viable option, and test, test, test!
    Expect to become an expert on browser inconsistency and a CSS guru; the situation hasn't changed in the past 15 years, it's not going to change soon.
    About 80% of web interface design work is finding workarounds, it's the nature of the beast.

  203. Re:but I thought HTML was supposed to fix all that by apetrelli · · Score: 1

    GWT has no free WYSIWYG editor and Chrome development plugin is available only in Windows, but a plugin for Firefox is available too.
    For the rest I agree, GWT circumvents very well some bugs/restrictions of specific browsers. It's funny to see what kind of hacks it does for IE6, but it works!

  204. Opera has a 2.2% browser market share. by pathai · · Score: 1

    Please do not force your user into using whatever browser you can get your application to run correctly in. Your application should work in whatever browser(s) your target uses. If it's IE6 (I'm really sorry if it is) then it needs to work in IE6. Here's a list of browser statistics from the W3C. http://www.w3schools.com/browsers/browsers_stats.asp Typically I would recommend all IE versions as well as Firefox (Windows & Mac) and Safari. Good luck.

  205. Re:but I thought HTML was supposed to fix all that by mini+me · · Score: 1

    I disagree. If money is no concern, Fendt offers a more advanced tractor in the same price range as a Deere. If you are budget consious a CIH/New Holland or Massey will get you more tractor for your buck.

  206. Re:but I thought HTML was supposed to fix all that by mini+me · · Score: 1

    There is nothing wrong with Javascript per se. Look at the work the Cappuccino guys are doing, for example. The problem is the browser: Why do we think deploying applications on HTML/CSS is a good idea?

  207. Re:but I thought HTML was supposed to fix all that by terjeber · · Score: 1

    Really? There is nothing wrong with Javascript per se? So all the language advancements that we have had in computer languages since 1976 are irrelevant? Get real. Javascript is a horrifying joke of a software development nightmare.

    Why do we think deploying applications on HTML/CSS is a good idea?

    We don't.

  208. Re:but I thought HTML was supposed to fix all that by mini+me · · Score: 1

    Well, what, exactly, is wrong with Javascript as a language? Like every other language, I do not believe it is the right tool for all jobs, but it is fine for some jobs.

  209. Re:but I thought HTML was supposed to fix all that by quickOnTheUptake · · Score: 1

    I'd just like to point out that if you have to restrict your web app to one browser for it to work properly, you might be using a web app where a non-web app would be more appropriate.
    The whole point of the web is to be platform independent. If you end up requiring a particular browser to use the app, then why clunk around with web technologies in the first place?
    I half suspect this reaction is what is underlying some of the comments.

    --
    Mod points: Guaranteed to remove your sense of humor.
    Side effects may include gullibility and temporary retardation
  210. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0

    Actually there were 2 questions.

    The first (general) question was about browsers. The folks with some experience seem to be answering that the first question is the wrong question to ask (ie. the question assumes the solution is to write something specific to one browser and force your users to use it, but that is not the best solution).

    The more important (ie. the is the actual specific problem) question was about printing functionality and how to make that work well in all browsers. This is the question the experienced folks are answering. No need to bust their chops for providing a better solution...

  211. Re:but I thought HTML was supposed to fix all that by terjeber · · Score: 1

    Javascript is certainly the right tool for some jobs. Any scripting language is the right language for small automation tasks. Anything that requires a few lines of code.

    Once you are to develop any serious application, typically those run into thousands, tens of thousands or more lines of code, a toy scripting language will not do. There are for example no OO features in Javascript (really, none) which makes it an absurd choice for anything serious. In the same way that you would not use C today for an LOB app, you would not use Javascript. Basic from 1985 is better than Javascript.

  212. Re:but I thought HTML was supposed to fix all that by Anonymous Coward · · Score: 0
    I see his point. This happens every time a question is asked on here. There are two or three comments that actually address the problem, and everyone else gets into a flame-war about something completely tangential to the matter at hand. His anger, if any, is completely justified. You're obviously a fan of irony because that quote is relevant, but not for the reason you think:

    If Henry Ford asked his customers what they wanted, "a faster horse" would have been a relevant answer, as it is at least what they wanted. The OP asked a very specific question, with more than enough detail for any reasonably intelligent person with experience to answer it, and instead he gets a torrent of irrelevant bullshit. If we're making comparisons, it's like if a customer asked Henry Ford what fuel he should put in his employer's Model-T, to be told that he should instead buy a new Model-A. Anyway, Ford refused to update the Model-T for years. Before finally relenting, and ceasing production, Henry Ford ignored what his customers actually wanted and decided that the model T was all any person should ever want or need, and that's what allowed other car manufacturers to come along and eat his lunch. They actually listened to their customers and realised they wanted improvements on "bare minimum" and that influenced their manufacturing processes.

    Anyway, rather than contribute any more to the noise, I'll be off, but since you're such a fan of quotation I'll leave you with this:

    Better to keep your mouth closed and be thought a fool than to open it and remove all doubt.

  213. Re:but I thought HTML was supposed to fix all that by mini+me · · Score: 1

    There are for example no OO features in Javascript (really, none)

    Javascript most certainly is an OO language.

    function Foo(baz) {
      this.bar = function() {
        return baz;
      }
    }
     
    var foo = new Foo("baz");
    foo.bar() == "baz";

    Granted, it is not a Class-based OO language, it is a Prototype-based OO language. A different approach to OO, sure, but that does not exclude it from being an OO language.

  214. Re:but I thought HTML was supposed to fix all that by terjeber · · Score: 1

    Basically all aspects of the above "OO" can be replicated, almost line for line, in C. That doesn't mean C is an OO language, it means you can develop OO code with C. You do the above with a struct and a function pointer. The fact that you can create a "class" or a prototype in a language doesn't make the language as such OO.

    Things like inheritance and polymorphism can essentially be done in Javascript, but there are several differnt ways of implementing them. Douglas Crockford advocates one way, Kevin Lindsey a different. This is because the language as such is not OO. That I can do OO in assembly - again, I have done it with the appropriate libraries - doesn't mean that it is supported in the language.

    Hell, the easiest way to create OO Javascript is to use GWT and write in Java. This is by the way the only way a sane developer would do Javascript.

    If a developer is going to put together a complex LOB app, one that maintains state, does wizard-like stuff and so on, and said developer suggests Javascript as the language, he should be fired on the spot. It will take far more effort to do it in JS than in the alternatives, and as it is an LOB app, there is no need to consider which browsers "everybody" is running. A Javascript app will also be a nightmare to maintain compared to something running in a plug in. Even Google can not make apps look the same in IE and Firefox except in the most simple of cases. Anything semi-advanced with GWT and it will look different in IE and FF. No such worries with a plugin.

  215. Re:but I thought HTML was supposed to fix all that by mini+me · · Score: 1

    You're right, I only showed the simplest case. If you would like to learn more about why prototype languages are OO languages: http://en.wikipedia.org/wiki/Prototype-based_programming

    Also, if you really want class-based OO in Javascript, there is always Objective-J, which is fully supported by browsers.

  216. Re:but I thought HTML was supposed to fix all that by LWATCDR · · Score: 1

    He is having problems printing. In this case Java may be the best solution to the problem. Given a choice I really do prefure java to java script but that is just me.
    In this case he was asking for the best browser to solve his problems.
    I would suggest using Chrome since this seems like an Intranet app and not an Internet app.
    To solve the printing issue I would suggest going with a PDF output. That will bypass all the issues with browser printing and will give the developer a good print out. Hey PDF really is a good solution for printing.
    But yes there seems to me a lot of ways to skin this cat. You could write a Java app or applet. You could do a classic client server solution in any number of languages, you can do a browser based solution.
    Since the author posted that he is writing in Rails he is probably committed to a web based solution. A popular but I feel over hyped solution. However if that is where his skills lie might I suggest that he look at http://www.rubyinside.com/prawn-ruby-pdf-library-987.html and http://ruby-pdf.rubyforge.org/pdf-writer/demos/index.html
    Since this is a ticketing system for a shipping he may want to think about things like interfacing with RFID and barcode readers. Not to mention generating barcodes.

    --
    See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
  217. Re:but I thought HTML was supposed to fix all that by risinganger · · Score: 1

    Well I can't speak for your 5 year's worth of painful experience - all I can say is this hasn't been mirrored in my use of the language.

    As for the insinuation that I'm biologist speaking our of my depth. I will have you know that the code I am referring has been tested against many other simulation packages in the same area, with no discrepancies (beyond the typical bug) discovered. I won't even bother to inform you of my background as there is clearly no point.

    It's obvious you don't like Java and your clients are welcome to listen to your advice. I for one believe some of that is probably down to the skill of the supposed developer. Stick to what you feel comfortable with - html.

  218. Re:but I thought HTML was supposed to fix all that by rufus+t+firefly · · Score: 1

    Macromedia tools are free?

    Also, I haven't had any trouble running the chrome plugin on my Linux machine ...

    --
    "He may look like an idiot, and talk like an idiot, but don't let that fool you. He really is an idiot." - Duck Soup