Tuesday, September 6, 2011

let's talk about programming a little now

First the is the IN and the OUT
Usually the client will provide you the IN and OUT and you will program the TREATMENT to achieve both

IN:
screen of the input the client want to do
as example let's say: a baseball team, member of team, first presence to the bat, simple, double, triple, homerun, retired, strike, ball
you can use numbers for players to enter statistics faster

OUT:
the statistics
a table with all teams, with highest score at top
another table, with all players for general point scored
another table for homeruns

The client need to draw thoses according to his wishes
the talk to the programmer about limitations (the screen is not large enough etc)

Now, why do i want to use a web interface for my IN and OUT
First, if i use a normal visual basic interface, i have to deal with:

IN CON:
1. static input interface, no zoom, no autoscale, no print option for inputs screen

2. the input need to be done in a grid, wich have certain limitations, mostly, it will show every column of the database, and will not allow half of them to be writable, and half of them to be read only in a visual sens of thing (like a different color if you cannot change a column)

3. fixed query. when you "program" a query in vb, you need the dataset to be linked to the database to do so. With dynamic query, where you can add or remove column according to permissions, or login name, you have a much better control of what you want to show to the user. Example: you can test each column permission and display thoses which the user have permission. In a grid, the grid would simply return an error if you dont have a permission on a column. Aditionnaly, you can manage noview, nowrite, readonly permissions on a column basis with a dynamic query. Plus sometimes, you need certains columns to manage the data, aka, the id column. But you don't want to display it in the grid. But it need to be in the dataset if you want to be able to update data with the id column.

OUT CON:
with vb, you have to construct a crystal report to view your results
if you add columns to the output, you have to modify your crystal report everytime, because it's not build dynamically

IN PRO: (for web interface)
you can zoom in or zoom out and the table in html will scale even if it goes out of the screen, a scroll bar magically appear

you can decide to skip a column you don't want the user to see, since you build the table yourself

OUT PRO:
you can output in internet explorer, and print. if your page scale is 100% it will automatically adjust to the margin of the size of paper

you can copy past the whole result table in excel and it will go in every excel cell all alone since it's an html table

you can also copy past the table of results in word processor, that will accept an html table easily to make a better looking report (that will still be text, and not a heavy image)

since we can imagine the futur, you can change your vb code to asp and generate the web page dynamically from a server web with basically the same code

and all of it will be much lighter than a web app or a grid, a loading time, and a complete absence of possibility to customize the output

Enough talking let's do some code next!






No comments:

Post a Comment