You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Ted Husted <hu...@apache.org> on 2004/11/25 00:09:19 UTC

MailReader-Chain (was Re: svn commit: r106481)

Imports don't seem to show up on the SVN email logs, so I thought I'd point out that a MailReader-Chain demonstration application has been checked in to the sandbox. 

This is something I started several months ago in the Commons Chain CVS. Now that we are moving Struts to a Chain-based request processor, I'm looking forward to finishing it as a "best practices" example. 

Only the first "story" (Select language) is complete, but I'll keep plugging away. Of course, help and comments are always welcome. :) 

-Ted.

On Wed, 24 Nov 2004 22:37:02 +0000, husted@apache.org wrote:
>�Author: husted
>�Date: Wed Nov 24 14:37:01 2004
>�New Revision: 106481
>
>�URL: http://svn.apache.org/viewcvs?view=rev&rev=106481 Log:
>�Add README and STATUS files to describe the subproject state. Added:
>�struts/sandbox/trunk/mailreader-chain/README.txt
>�struts/sandbox/trunk/mailreader-chain/STATUS.txt
>
>�Added: struts/sandbox/trunk/mailreader-chain/README.txt Url:
>�http://svn.apache.org/viewcvs/struts/sandbox/trunk/mailreader-
>�chain/README.txt?view=auto&rev=106481



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: MailReader-Chain (was Re: svn commit: r106481)

Posted by Vic <vi...@friendvu.com>.
Ted Husted wrote:
  Of course, help and comments are always welcome. :)
> 
> -Ted.

What I have found my clients confused is that the DAO faking part is 
many classes in sample app, and it confuses them as to what is "Struts" 
and what is DAO xml reader, they both read XML. I would remove all the 
DAO, replace with something that is easy to undertstand and use and 
clearly not a part of "Struts". (I use this class in development also to 
generate data for a view for demo/prototype, without having to design a 
db, since I do not know what they want yet). Ah, and I win a design 
award. =:-} It just makes it simpler.

.V <eom>

public class ZFakeData {

	public static ArrayList getFakeRows() {
		ArrayList rows = new ArrayList();
		Map cols = new HashMap();
		cols.put("id", new Integer(1));
		cols.put("name", "Vic");
		cols.put("subject", "How to");
		cols.put("date", new Timestamp(new java.util.Date().getTime()));
		cols.put("content", "Now is the time to hepl the King1");
		rows.add(cols);
		cols = new HashMap();
		cols.put("id", new Integer(2));
		cols.put("name", "Dave");
		cols.put("subject", "C#");
		cols.put("date", new Timestamp(new java.util.Date().getTime()));
		cols.put("content", "Now is the time to hepl the King2");
		rows.add(cols);
		cols = new HashMap();
		cols.put("id", new Integer(3));
		cols.put("name", "Tom");
		cols.put("subject", "Struts");
		cols.put("date", new Timestamp(new java.util.Date().getTime()));
		cols.put("content", "Now is the time to hepl the King3");
		rows.add(cols);
		return rows;

	}



	public static Map getFakeRow() {
		Map cols = new HashMap();
		cols.put("id", new Integer(1));
		cols.put("name", "Vic");
		cols.put("subject", "How to");
		cols.put("date", new Timestamp(new java.util.Date().getTime()));
		cols.put("content", "Now is the time to hepl the King1");
		return cols;
	}


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org