Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

Winston Smith

Ranch Hand
+ Follow
since Jun 06, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Winston Smith

Friends, I've stumbled my way here from my usual watering hole, the JSP forum. Since this post would hardly be appropriate there, I've found my way to your company, with a story that is rapidly developing into a Greek tragedy.
Imagine a young, enterprising new programmer who appreciates the art and science of software development, who invests time in learning the foundations of the science, the theories and the practice. He is not an armchair programmer with an IT degree who has mastered the art of point-and-clicking (no offense, please). He has done his time in the trenches of differential equations, linear algebra, and the formidable calculus series and in a few short weeks, he will graduate with an MS in Computer Science with a 4.0.
This programmer has been an intern for the last year with a company whose name will not be mentioned. It has come time for this company to offer the programmer a full-time position.
The offer came and the programmer's vision of a bright, rewarding future with this company faded to black.
Such a tragic, gut-wrenchingly low amount. He knew for a fact people with BS degrees in IT were making at least $5K more within this company for the simple fact that they have been there longer.
So, if you've had the patience to get this far into the story, I ask for your opinion(s) on the following:
  • what is a reasonable salary for a new graduate with an MS in Computer Science?
  • what is a reasonable salary for a new graduate with a BS in Computer Science??
  • should this eager, young programmer flee to India, where apparently there is greater respect for software developers?

  • Thanks for your attention,
    WS
    16 years ago
    Sajjad,
    We've use the following software products to produce dynamic, web-based reports:
  • FDF Toolkit for Java
  • JFreechart

  • The FDF Toolkit is free and available from Adobe. We've used this software to dynamically populate pdf forms from a web environment. Basically, we have servlets which accept data from any number of sources (html form, JavaBean, etc.) and populate the pdf form with the data. This works nicely since you can create multiple templates for your reports in pdf format, and simply call the appropriate servlet to handle the report. Since the final report is in pdf format, it can be viewed directly from the web, printed, or saved to the client's local machine.
    JFreechart is a Java-based library which allows a developer to create dynamic charts and graphs (very easy to use). Once more, we've used this library in a web-based environment to display dynamic charts.
    One additional product you may want to look at is iText. I haven't tried this out yet, but I believe you can create pdf documents on the fly (using Servlet/Bean), and one nice feature is that you can incorporate images. So, you can use JFreechart to create the dynamic chart, then import the chart into a pdf.
    [ April 16, 2004: Message edited by: Winston Smith ]
    16 years ago
    JSP

    semicolons in JavaScript mean nothing at all!


    Haha, you know how long it took me to realize this? Well, I'm not going to answer for fear of embarassment/banishment from the Ranch forever. Javascript is such an interesting creature...I've often done things which were in complete opposition to standard programming practice.
    Go ahead and throw some strings in the pot, then some floats and maybe some arrays...stir it up and the sit back at watch code that has no business working anywhere else in the programming world, run like a charm.
    Hi All,
    I recently purchased numerous books on the topic of advanced HTML, web design and css. The purpose of this post is, since I am sorely disappointed in several of the purchases, to get some recommendations. Essentially, I ask for the top three books on your reading list in the aforementioned subject areas.
    Before I close, let me offer my own opinion on one of my latest purchases:
  • Advanced Web Design, by Fred Hofstettor
  • Okay, I admit, I did not even read this...Mr. Hofstettor, if I wanted to learn Frontpage, I would buy a Frontpage book. Please please please, when advertising your book, explain the fact that it is more of a Frontpage / bCentral / Microsoft web development primer than an "advanced HTML book." Come on, e-commerce wizards? Web page wizards? Scratch my butt wizards? Disappointing to say the least.
    [ April 15, 2004: Message edited by: Winston Smith ]


    You may not want to use each class as a Bean in itself.


    What I mean here is, every class you create need not function as a Bean. Certainly you do not want to create classes in your JSP. For instance, on a recent project, I have a WebEntity Bean which models a supervisor/upper management. Now this supervisor will have numerous employees under his/her supervision. Each employee is modeled by the Employee class. Now, the Employee class is not meant to work as a Bean, however, the WebEntity class maintains a HashMap of Employee objects, so, in the web environment, you will have access to and may iterate through, the Collection of Employee objects, even though they are not Beans.
    I use the above model often, as many classes need not function explicitly in the web environment, while others (the Beans), are made to work in the web environment.
    16 years ago
    JSP
    You cannot make this work if all the checkboxes have the same name. You'll need to follow some kind of standard naming convention, such as the name of the form, following by some integer i. This is how I usually code checkboxes when I don't know how many there will be (the code for the checkbox is within some loop which runs i times, and I name each checkbox FormName + i, so this way, when it comes to form submission, I can iterate through the checkboxes with a similar loop, checking which are set and which are not).
    16 years ago
    JSP
    You may not want to use each class as a Bean in itself. You can have one single Bean to act as a Manager, and this Manager maintains the Collection. Therefore, the Manager will be used to create an Iterator for your Collection and use the Iterator to reference each object in the collection.
    [ April 13, 2004: Message edited by: Winston Smith ]
    16 years ago
    JSP
    You really should post this in the HTML/javascript forum, but anyway, here's one technique:
    Assume the following HTML:

    "class" refers to the CSS label (which is contained either in the page, or in a seperate CSS file (styles.css).
    So, if we have a seperate file called styles.css, we would define the following:

    So essentially, "The Ranch" will be 10px, Arial, and the color blue. There are several different ways to accomplish such formatting. This one uses an external style sheet.
    WS
    What we've been using as a model is as follows:
  • JavaBean controls standard database connectivity (maintains access info such as IP, port, username, etc.); also responsible for opening / closing connections
  • Beans which require database connectivity extend the connectivity class mentioned above, this way, they inherit the ability to open and close connections, and perform any JDBC operations
  • Beans (or Servlets) retrieve data from database, and deliver to JSP page, where it is displayed appropriately

  • This model enforces a good seperation between business logic and presentation, a seperation which, in my opinion, is critical if you're developing any web apps of substantial size. I've had the misfortune of debugging my co-worker's code on several occasions. All of his business logic was contained in the JSP page itself, so you can imagine how large such a page can get -- it became a nightmarish potpurri of SQL queries, result set parsing, and data structure manipulations. The "guts" of the program do not belong in the JSP page. Keep them contained in Servlets or Beans.
    WS
    16 years ago
    JSP
    You may also want to do some reading on the MVC (Model View Controller) architecture, especially since you are incorporating a database. Sun's site has some pretty good white papers on MVC architecture.
    16 years ago
    JSP
    Hi All,
    I'm creating a banner which spans the width of the page, and I have two images to include in this banner: flag.gif, and logo.gif.
    I'm aligning flag.gif on the left, and logo.gif on the right. Now, if I were using TABLES, I would do something like:

    So, I'm trying to model this banner with DIVs, and I'm not sure I'm doing it the best way:

    Here is my CSS (*NOTE: I'm just getting my feet wet here with CSS, so don't laugh!):

    The titlebar is simply a solid bar which runs along the bottom of the banner. Initially, I tried to nest the "rightBanner" DIV inside the "banner", but IE didn't like this -- it set the "rightBanner" width to 100%, but instead of starting at the left margin, it started the DIV at the end of the first <IMG>, so naturally the "rightBanner" ended up trailing off the right side of the page.
    I don't know if I'm making sense, but any guidance on DIV layouts will be greatly appreciated.

    Thanks,
    WS
    In order for the user to edit text, you'll have to provide some sort of input field, such as a <TEXTAREA>. You can set a textarea to readonly by using the READONLY flag:
    You'll need to implement some sort of session tracking, to keep track of first-time visitors to the page, and repeat visitors. An easy way to do this is to use set a session variable (e.g. session.setAttribute()). If you're wanting your form values to persist throughout pages, you can use a JavaBean to store the values as the user navigates through the pages.
    16 years ago
    JSP