CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Where is the Java documentation?

Print topic Send  topic

Author Message
Ivano
Posted: 12/01/2002, 11:20 AM

Hi,

please could someone tell me where I can obtain the "CodeCharge Studio Programming Reference" ?

At page 60 of "Codecharge Studio Tutorial" there is a reference to the above manual but I can't retrieve it.....

I see the topic "Programming Reference" in the Help system of CCS 1.07 BUT I can't see anything about Java coding.

I'm looking for more and detailed informations about functions and properties available in CodeCharge programs referring to the Java environment (JSP and Servlets code customization (Events!!!) and generation).

Thank you,
Ivano
RG
Posted: 12/01/2002, 2:16 PM

Ivano,

As far as I know there is still no real CCS programming reference for jsp and servlets. It looks like it is even lacking for PHP and ASP which are the most used languages with CCS. I think PHP and ASP are so popular because PHP is a opensource (free stuff) and ASP+IIS come just with windows (already there) etc.

Back to your question. Did you already download the documentations from "http://support.codecharge.com/tutorials.asp"? There you will find some useful information and examples. Try also "www.codechargers.com".
It looks like there are some jsp and servlet changes with the CCS v2.0. May be we can hope for better documentation.

Until then, I generally rely on my own java skills and in the case that I am really lost I contact the YesSoftware support. I had always fast and useful responses from them.

All in all, I find CCS absolutely worth to work with. It has a very small learning curve before you start to do serious stuff with it.

Good luck
Ivano
Posted: 12/02/2002, 2:24 AM

Tahnk you for your contribute.

Yes, I agree with you 100% about the ASP and PHP..... I think that for serious business develop we have to take a choice between ASP and Java.

But if I can take a choice between a serious computer with a serious S.O. (Unix, OS/400, OS/390) and a PC with Windows S.O. my direction is the first.

If I was YesSoftware and I want to do serious business also with big companies my choice is to follow big IT Vendors, so my focus is Microsoft (ASP), IBM and Sun (Java). I can still take care of PHP but not as the primary technology.

Until CCS 1.07 I see the opposite.
In the tutorials the main language is ASP and PHP. Java is missed.

Alex from CCS wrote my that a new documentation is in progress also for JSP and Servlets so I'm waiting.

Sincerely, Ivano C.
RonB
Posted: 12/02/2002, 4:42 PM

I wouldn't be so quick to rule out php as a serious candidate for buisiness. PHP is widely used on the inernet and is faster then any of the other candidates. It gives api acces to a large number of databases making communications a lot faster then odbc connections. It offers com dcom and other types of support and yes it's free. It also runs on several platforms instead of being tied down to money sucking windows. In the financial climate MS created with their new liscense scheme a lot of people and buissinesses are looking for alternatives.

RonB
RG
Posted: 12/02/2002, 5:59 PM

Sorry, absolutely nothing against opensource and free software. Also there must be a reason why so many people use PHP. It is just disturbing to have the solutions but not in the language you use.
About alternatives I agree that there must be a lot of them in the market. I personally liked IBM OS/2. Another money sucker, but at least held what it promised.

Regards,
RG
Ivano
Posted: 12/03/2002, 8:38 AM

Hi!

I tested a little application created with CC2 and generated with CCS 1.07 as Servlets. I built a complete and full functional Java environment over a BIG IBM iSeries using components at NO-CHARGE: HTTP Server powered by Apache and Jakarta Tomcat Servlet Engine: my Web Application run very fine! Now, if I need, I'm able to get my .war file and deploy it on a little PC with MS Windows 98 or to a Linux box or to a very very big IBM mainframe.... can PHP to do the same?

It's not a joke... it's a real question!

If the reply is NO, then I'll assume that, beside PHP is a no cost exactly as Java, for my business I'll use Java. Moreover, I'm seeing the big IT companies using many many many US$ to sponsor and develop Java environment, not PHP.

(Another serious question: PHP means 'Personal Home Page'?)

Coming back to my problem, I know how to write a record in a database via JDBC, but I'm not able to do that in a AfterInsert event of CCS... :-(
How are the field names? Do I need to open a new connection to the db? And so on....

So a few days ago I asket to YesSoftware to tell me where I can get this skill. Browsing the documantations and examples I can get only material about ASP and PHP.

Bye,
Ivano, from Italy.
RG
Posted: 12/03/2002, 10:25 AM

Ivano,

please describe exactly what you need to do. May be I can help.

Here is a list of what I can offer:
- Functional file and picture upload in jsp. Found a free upload javabean in internet and adjusted it for my needs. It works great.

- Username, password and generally text MD5 encryption class integrated in the com.codecharge.util package. Zero maintenance.

- Some Custom Codes in the CCS Events with manual executed database queries.

Regards,
Ramin
Ivano
Posted: 12/03/2002, 12:34 PM

Dear Ramin,

first, thank you for your reply.

In fact what I need is to understand the "big picture".... if I need to use some custom functionalities I need to know how interface my Java code with the CCS code, objects, properties, etc.

My English is not so good so I hope to be able to explain my situation.

For exemple, I need to do a AfterInsert to add a related record into another table after I wrote a record in the main table with the standard Record form of CCS. So I prepared the sSQL variable with the SQL statement inside.
'String sSQL="insert into .....' is ok?
.... and to prepare the fields? What are the names in CCS? Maibe I need to do some translations before to pass the fields to the sql statement?

And after, do I need to open a new connection to the database?
In Java:
Connection conn = DriverManager.getConnection......
Statement stmt = conn.createStatement();
stmt.executeUpdate("insert into ...... ;

BUT inside CCS???? Where end CCS and where start the pure Java code?

And again: You told me that you found a javabean and adjusted it for the use in CCS. This is another big "hole" in my skill.
My question to you: Where you learned the method to include external code in CCS.... in CCS docs or by your invention, fantasy and imagination?
I'm telling you the above question in the meantime I'm smiling but the problem for me is serious, because I'm feeling that CCS is a great and usefull product but not documented at the same level.

If I have a java class, a javabean, a java servlet... and I need include it in my CCS project, do I need to compile it and then..... then?????

Yes, I'm very interested in your code expecially the upload and the Username & password functions, at least to understand the 'link' between CCS and external code.

I thank you for your attention..... my email isicarrara@studio5.it

Maibe you can help me.....

Sincerely, Ivano C.
RG
Posted: 12/03/2002, 2:55 PM

Ivano,

For that I need a little bit more time. Please be patient. I'll try to catch up tonight or tomorrow night when I am at home. I'll also put some of the code in the forum. May be it helps other people too.

Regards,
Ramin
Dandavat
Posted: 12/04/2002, 1:22 AM

Hi Ivano,

Did you try to generate java doc from CCS sources yourself?

As for plain JDBC, you are welcome to use it wherever you need it, as well as JDO and EJB. And to populate controls with retrieved data use:
e.getSource().getControl("user_name").setObjectValue(rs.getObject(2));

e is the Event object, I presume it is Before Insert,
getSource() is the Record model,
getControl("user_name") is the TextBox model,
and setObjectValue() sets control value from ResultSet.

At least you can start from this point. Further you can learn about DataObject Events and how to use pooled connections, SqlCommand and SqlParameter classes etc.

Pranams,
Dandavat.
RG
Posted: 12/05/2002, 1:18 AM

Ivano,

To understand the way ccs jsp works there is no better way at the moment than to study the source code. Specially the package "com.codecharge".
Creating javadoc from java classes is an excellent idea. Also CCS classes have mostly good self-describing names like PoolJDBCConnection, connection, SessionStorage, CCLogger etc.

Your custom codes for the events are always in the %classname%Handler.jsp files right in the project directory. As example for "Login.jsp" it is the "LoginHandler.jsp".
If the your queries are not in the same event, you have to create a new instance of the class PoolJDBCConnection for each database query. As Example :

PoolJDBCConnection ds = new PoolJDBCConnection("mydatabase");
String sql = "SELECT * FROM employees";
Hashtable userId_Hashtable = ds.getOneRow(sql);
...
Setting a session variable:
e.getPage().getRequest().getSession().setAttribute("UserID", userId_Hashtable.get("employee_id").toString());
...
Executing sql queries:
ds.executeUpdate("UPDATE employees SET ...");

Example for getting the string representation of a session variable and getting an instance of the SessionStorage:
String uid = (String)SessionStorage.getInstance(e.getPage().getRequest()).getAttribute("UserID");

Getting the content of a Textbox:
((TextBox)e.getParent().getChild("user")).getFormattedValue();
"getFormattedValue()" delivers the string representation.

And so on ...


Here some words about using your own classes:
You can put the source code in the project directory or in the package com.codecharge. As example: I have a class "DigestEncryption.java" for encrypting passwords before saving them in the database. I use the java.security.* and sun.misc.* packages.

Put the java file for example in the package "com.codecharge.util" which is
%project directory%\CCSBuild\src\com\codecharge\util\
Don't forget to specify the package name in your custom class:
package com.codecharge.util

CCS, actually jakarta ant would compile the class and pack it along with the other classes into the WAR file. The good thing about this is that CCS imports these com.codecharge packages automatic in the pages. You can check it in "yourpage.jsp" import list. Generally when you need to import a class or package into your page, you import it in the "yourpage.jsp" and you can reach it also from your "mypageHandler.jsp". The rest is more java programing like creating an instance of the class DigestEncryption and using it's methods to encryt, decrypt and compare strings.


Using the uploading javabean:
I use an upload javabean which comes already with a jsp client as sample. Use javascript to open up a new window with the jsp client file. There you can have the input field and the browse directories button (HTML stuff). Keep the client jsp in your project directory. Copy the javabean in your app server's shared\lib\ directory if possible or include it in the CCS properties -> Runtime libraries.


Good luck,
Ramin


Ivano
Posted: 12/06/2002, 10:07 AM

Dear Ramin,

thank you for your effort to help me!

I'll study with big attention your suggest.
Your notes are very clear!

Could you give me your email address? Maibe in the future we can talk again togheter and I hope I'm able to contribute in my turn.

Sincerely, Ivano C.

RG
Posted: 12/06/2002, 11:38 AM

Hi Ivano,

That sounds good. I will stuck for sure soon and it costs a lot of time to research alone.

I didn't write the address of the upload javabean website here because I didn't want to advertise. Also be aware that the javabean is not free IF YOU EARN MONEY WITH IT.

I'll email you the address of the website so you have my email address too. If anybody else is interested please reply to this message and write your email address in it.

Also sorry about the DigestEncyption class. I have some stuff in it that I can't expose for security reasons but there are enough examples all around the internet and in the official SUN website. Let me know if I can help else.

Good luck,
Ramin

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.