Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Java

Journal Journal: Sourceforge Project is Live: java, webwork, hibernate, mysql 3

So the source forge project officially exists now. Not that it is usefull to anyone yet, but there it is.

I don't have the source code up yet, but that might be finished by the end of today. The source is currently available on Google Code if you must see it. Don't expect to be able to Compile and Run, as the project has many dependencies that are not available yet (in house libraries that I need to get permission to release).

The project uses Java with webwork providing the servlet and hibernate doing the database access. There is no real JSP work going on, but that may change. The project is light on the presentation (very light in fact) so there is lots of headroom for growth.
Like I mentioned before, the project makes HEAVY use of static factory methods to eliminate constructor use.

I welcome all comments on the project and would LOVE to hear from more experienced developers regarding the project packaging and design (ie our use of factory methods, directories & repositories, etc).

Jason

Java

Journal Journal: I submitted a request for a Source Forge Project 6

Wow, I haven't been posting much lately? Probably because I am so dang busy with married life, and my job. Speaking of my job......

So I finally got around to reading about how to open up a SF.net project. I picked all the necessary info and submitted my project description. The project is something that I have been working on with a coworker of mine as a learning project for our job. Nothing too fancy. It is a web-based shopping cart using Java, WebWork, Hibernate, and MySQL.

The project is in the approval process , but if approved will be called JaWaH-Shopping (Java and Webwork and Hibernate.... see aren't I clever). Feel free to take a look when / if the project is approved. We make HEAVY use of factory methods to hide the implementation details. I am starting to like factory methods more and more despite them being hard to wrap my head around at first.

Right now the project isn't fancy, but it does have a fair amount of features. There are 6 DB tables (completedOrders, orderStatus, items, orderedItems, shippingOptions, and CreditCards), 130 source code & config files covering: 6 DB directory interfaces, 6 DB repository interfaces (yes we separate them just to be completely confusing) and therefore 6 hibernate directories and 6 hibernate repositories, 6 persistence factories to choose the persistence dir / rep (currently only have the hibernate dir & reps), shipping calculator & factory, and 13 POJOS (plain 'ol java objects), an assorted dozen or so java action classes for webwork to play with, and a dozen or so xml & config files for hibernate & webwork. The amazing part is that it works, though we have only been running it inside of the OC4J J2EE provided with JDeveloper. One of my tasks this week is to get it functional in a tomcat install, even though that is not what we use for our production J2EE environment.

The project does have a few library dependencies: An in house Persistence manager (need to figure out legality of release for the code), Hibernate 2.1, MySQL Connecter (provided by JDeveloper), WebWork 2.2, Commons Logging (jdeveloper package), the JSP runtime, webwork taglib 2.2, Jdeveloper Commons Collections, JDeveloper's Log4J (logging), JDeveloper Commons Lang 2.1, some in house webwork extensions, an in house message framework (not sure if it is actually used right now), Jasper Reports 1.1 (not used yet), and Jdevelopers JUnit support library. So far the in house packages will need to be left out of the source forge project until I can get them released. Who knows, they may not be needed at all with a few changes to the app.

The functionality map roughly follows below:

  • v1.0 - Create Orders and store orders in DB table (completedOrders table) from items manually populated in DB (items table)
    - Store instance of item being purchased (orderItems table) so price is locked in at time of order
  • v2.0 - AdminInterface package separated from ShoppingCart package. - Item admin interface; create new items & edit existing items.
  • v2.5 - Item sales reporting; reports on sales per item & total sales per item (% # sales, % $ sales, etc).
  • v3.0 - Shipping Options admin interface; shippingOptions table; Create new shipping options & modify existing options
    - Shipping Calculator factory, shipping calculator interface, simple graduated shipping calculator implementation
    - Order Status admin Interface; create new order status steps (orderStatus table) (aka step 1 - received / 2 - charged / 3 - shipped)
    - ShoppingCartValidator; all text input passed through validator object; validator checks for properly formatted phone numbers, credit card numbers, exp date, security #, zip codes, and text
  • v4.0 - Order time date stamp (added column to completedOrders table)
    - Order Status valid flag added to Order Status admin interface
    - Order status added and init to default first valid step (column added to completedOrders table, new hibernate queries)
    - view Completed Orders list; paged in groups of 10
    - view order details from completed orders list
  • v5.0 - Shipping Options selection added to Checkout process
    - All options have pre-calculated total if choosen
    - Warehouse interface: orders not on the final process step can have their order status step changed
  • v6.0 - Item Valid / discontinued column added to DB (shippingOptions table) and added to admin interface
    - Only valid items displayed for Shopping Cart interface
    - Shipping Options valid column added to DB (shippingOptions table) and added to admin interface
    - Only valid shipping options displayed by Checkout process
    - Item Inventory column added to DB (shippingOptions table) and added to admin interface (NOTE: not used anywhere yet)
  • v7.0 - Credit Card table added (CreditCards)
    - Credit Card Admin interface added
    - Valid Credit Cards displayed in drop down box for Shopping Cart
    - JavaDoc comments occasionally added to existing code

The functionality currently in the works or planned is as follows

  • v8.0 - Customer order status interface. Might require adding email address to checkout process (and another column to completedOrders table). Customer can lookup order status by email. Add email address to ShoppingCartValidator
  • v9.0 - Track item inventory; A purchase would automatically decrement inventory to show a demand for item; admin / warehouse interface would need to fill that order. Inventory can show negative quantity indicating backordered items. Shopping cart would need to display backordered items with warning.
    - Add Inventory interface which can only change the inventory quantity
  • v10.0 - Persist customers; another DB table referenced by foreign key in the completedOrders table, a customer authentication interface, a directory / repository / factory / action or two and a few POJOs
  • v11.0 - Persist customer credit card information; another DB table referenced by foreign key in the completedOrders table, a directory / repository / factory / action or two and a POJO
  • v12.0 - Use tomcat instead of only JDev's OC4J
  • v13.0 - ?????
  • Profit!

So now that you see most of the design / roadmap, any comments? Any one want to see the code even if there isn't a source forge project? Questions / comments / feuds with our frameworks of choice or other oddball design choices (What the heck are all these factory methods and repositories & directories!??!). All this java programming reminded me that Josh never did do the unread.org thing. I wonder how hard that would be knowing what I know now? Of course I would want to just add everything to a zillion tables in the DB and would probably make a royal mess out of that project precisely because I do not have any experience on the architecture end of things. What little design there is to this project is from the general information given us by our boss as well as the general edict to "go forth and by fruitful and multiply thy functionality. Oh and keep busy till the background investigations clear so we can show you production code."

jason

User Journal

Journal Journal: Introduction to Me

So I suppose it is only fitting that I take my first entry of my journal and completely waste it on introducing myself.

My name is Matt and I am (for lack of a better word) a geek. I have a wife and two kids (a girl and a boy). I started my career in the Air Force as a 3c0x1 (which in the real world translates into the guy who fixes the computer). So anyways I worked my way up the technological ladder pretty quickly and before I knew it I was the go-to person in my shop. I maintained many servers and a couple of SANs. While in the Air Force I was stationed at Fairchild AFB, WA, Kunsan AB, ROK, and Beale AFB, CA.

Fairchild was my first base and I ended up kicking boxes in a warehouse, the only difference between me and every other box kicker is my boxes held computer equipment. Eventually my job evolved first into imaging all of the machines, and then into testing new implementations in a new environment. This is when I got a little high on my horse and was bucked off by a little bit of legal trouble. Basically when you boil it down, I got in trouble for under-aged drinking. I am not going to sit here and argue that I was defending my country why can't I have a beer, blah, blah. Bottom line is I broke the law and I got in trouble for it. In hindsight it is probably one of the best things that has ever happened to me in my life, remember I am still just a glorified box-kicker. During this whole ordeal my supervisor and I had a falling out (he did not think my punishment was harsh enough) and I went to my First Sergeant to let him know that I would be willing to do any job as long as I did not have to work with my supervisor. I was immediately transferred to the Network Administration shop where I quickly picked up on my job and proved myself as more than just a box kicker. I met and married my wife at Fairchild, then one day we found out that she was pregnant. We were terrified and excited. 3 days later I received orders to Korea... Alone.

Kunsan AB is basically in the middle of nowhere in the middle of Korea. I quickly learned that Korea is a very different world than I was used to. They have mandatory military service which consists of Army, Coast Guard, Air Force, and Police Forces. This mandatory service had a few direct effects that I noticed, they had a very high suicide rates, because of this they were not given real ammo, just blanks. They also had police seemingly on every corner. They also had open sewers called binju ditches. I mostly stuck to base since it was a lengthy cab ride to just about anywhere and because I missed my wife and kids and did not enjoy the temptation of 'juicy girls' in the bars. This is not to say that there was no temptation on-base or that I did not drink the entire time I was there. I drank well over my fair share while there. It was pretty funny though to watch how people change when you take them away from their families. If two people were married and in the military they had the option of both going to Korea, however they would have to go to separate bases about three hours apart. Which meant you could see each other pretty much every weekend. These people were the most likely to cheat and/or divorce. Eventually the drinking paid off and I went home to my Wife and kids after a very difficult year.

Now that I was back from Korea I had the long and arduous task of getting to know my wife and kids again, you would be suprised how much people change in 1 year. Beale was a really easy base for me. I started up a side business where I would repair computers for people on base for a very small fee. The majority of customers where wives who had a virus and their husbands were deployed in Iraq and unable to fix it. The most memorable job I remember I was a woman whose husband had been gone for 3 months and shortly before he left they bought her a new computer (so she would not have any problems) she was not updating her virus definitions and got a virus which made her machine very difficult to use. I was able to clean her machine in about 6 minutes, and as I told her that I was all done and she can check it out to see if it is back to normal, she immediately burst into tears. Through the tears she then told me that she would have thrown the computer away had she not saw my ad that day, and it was not even paid for. I showed her how to prevent it in the future (as best as you can when you are dealing with a sobbing woman). She later sent me a card to let me know that she has been able to talk to her husband over AIM and is doing much better. I received a job offer to work on-site at the FBI Field Office in Seattle, WA. I quickly jumped at the opportunity. Luckily force-shaping (a program the Air Force implemented to allow people to apply to separate early) had been implemented, so I was feasible for me to leave. So after 5 years I drove a rental truck with all of my family's belongings to Seattle.

The FBI turned out to be a little bit of a disappointment, and I quickly grew tired of the bureacracy that goes with a federal agency, and began looking at other opportunities. I had alot of interest but only in stuff that I did not want to do (low-level Windows stuff) or positions that did not meet my salary requirements. I pressed on with a job that I did not like and eventually an opportunity presented itself in, of all places, at a Girl Scout Meeting. My wife was a girl scout leader and my daughter was a girl scout. Because of this I became the one who carries the Girl Scout stuff. One day my wife told me that one of the other Mom's mentioned that her company was having a hard time finding someone who was qualified for a position that they were hiring. I applied, interviewed, and was hired shortly thereafter. That is how I came into my current position.

This is basically the cliffnotes on my fairly recent life. I may expound upon them in later entries or perhaps just use them as my soapbox.
User Journal

Journal Journal: Metamoderators, please read.

This journal entry is for metamoderators.

I hold some political beliefs that are unpopular. For several years, there has been a campaign to destroy my karma because of them. Approximately once per week, someone gets mod points and goes back and mods down my posts. I'm not saying that every one of my posts is brilliantly insightful or informative. I am not above occasionally being flippant or stooping to the level of a troll, but many of my on-topic posts are moderated as off topic and many serious discussions are moderated as trolls.

If you see such an example, please metamoderate it as unfair.

Thank you.

User Journal

Journal Journal: My foes 3

If I've added you as one of my foes, it means one of three things:

1) You're a flaming liberal, and I don't want to waste my time reading your drivel. Grow up, learn how the world and the people in it really work, and become a conservative.
2) You're a self-centered nerd who says things like "I don't like Microsoft, so I don't buy their products, so they will go out of business." Just because you are/are not doing something, Sparky, doesn't mean it's going to affect anyone else. One anecdote does not a data set make.
3) Ur speling and, like, grammar are just, like, bad, and stuff. Go read a basic book on English grammar, so you can learn when to use who and whom, when not to use "you and I" instead of "you and me", and what an infinitive is and why it's so important not to split them.

If you want to know which one of the three landed you on my Foes list, just email me (cor bettw at ya hoo dot com). I promise I won't add your email address to every porn spam page I come across.

User Journal

Journal Journal: Baby Got Book Video 2

I was just catching up with a friend of mine on IM when he signed off with a link to this funny video based on the famous (infamous if you like) Baby Got Back by Sir Mix A Lot.

Not only is the video just plain funny (complete with huge but fake gold jewelry) but White Boy DJ sure does a good job of using the original content in a new way. Add to it that the video does have a good message and this is a winner.

jason

User Journal

Journal Journal: Have you Meta-Moderated recently? 2

Very odd, I Meta-Moderated earlier today, then this afternoon I get prompted to do so again on the homepage. I thought it was set only to do so once a day. Are there that many moderations being done now, with not enough meta-mods? Too sad, if that's the case.

As much as I gripe about the editors and the way they pick articles, Slashdot belongs (in a very real, if figurative, sense) to all of us. We all need to participate in moderation and meta-moderation for the site to function well. So come one, guys and gals, give a hoot, meta-moderate! Remember, only you can stop unfair moderation!

User Journal

Journal Journal: Latest submission, let's see what happens 5

I just submitted this article, let's see if they run with it:

I'm sure most Slashdotters have heard about the Mohammed cartoon controversy already, but here's an update. Fox news is reporting that gunmen have started storming hotels and apartment buildins in the West Bank looking for potential European hostages. This is on top of the large and loud protests in half a dozen Muslim countries, with protestors chanting "Death to France" and "Death to Denmark". If a little cartoon can cause this much uproar, can the Dar al-Islam (Muslim nations) and Dar al-Harb (everyone else) ever live in peace? Should we have any respect at all for a religion with this much contempt for freedom of expression?"

User Journal

Journal Journal: Flame on! 2

Oh, this is too much. Yesterday, I submit an interesting article about global warming being not-so-global, and it gets rejected. Today, I submit an article about bee flight and make a lame editorial comment about Intelligent Design, and it gets posted to the front page! Global warming, and both the science and politics behind it, are arguably far more important than how bees fly, but the article with the flamebait, anti-religion comment in the submission is the one that gets posted, not the one criticizing liberal beliefs. Sheesh, they're not even trying to hide their bias anymore, are they?

Hey Taco, if you're reading this, maybe you should look in the mirror the next time you want to yell at your site visitors regarding story selection.

News

Journal Journal: 2005 Second Warmest Year in Over 100 1

The liberal editors of Slashdot keep rejecting my submissions, so I guess it's time I start entering them in my journal, instead. Here's one that was rejected, despite the interest so many Slashdotters have in the environment and the subject of global warming. Guess they don't want to publish anything that will go against the prevailing liberal myth of human causes of global warming:

According to this Yahoo News article, from LiveScience.com, 2005 is the second warmest year on average since accurate records began being kept in the late 19th century. This is significant because it was predicted to be the warmest, showing that the climate data models being used aren't as accurate predictors as some claim.

Also, most of the warming is shown to have occurred in the North Pole. From the article, "It just doesn't look like global warming is very global," said John Christy, director of the Earth System Science Center at the University of Alabama in Huntsville.

Given that the warming shown around the world is still 3C cooler than 800 years ago, I really wish the hysteria about global warming would just go away. Humans, and the rest of nature, have experience far more pronounced climatic shifts than what we're seeing today and not survived, but prospered. Even as bad as the Little Ice Age was, if it hadn't happened we wouldn't've had the large influx of immigrants to America (bad for the natives, good for everyone else), wouldn't've had the French Revolution (bad for the nobles, good for everyone else), and might not have had the Renaissance (since the severe population decline from the onset of the ice age and the Black Death that was fueled by it led to higher wages being paid to the few craftsmen who were left, and hence a higher standard of living for the survivors...I'll try to find the article I read about it but it's not coming up in the first few results so far). So while the climate is changing, we don't yet know if it will be a net boon or not to mankind.

Personally, I'm much more worried about the pending magnetic reversals. Though seeing the Northern Lights in Texas will be quite a sight!

United States

Journal Journal: George W Bush! 7

I couldn't be happier about the presidential election. GWB is the winner. With one supreme court justice in poor health and several others who are well past the average life expectance for Americans, it couldn't be more important to have him in the White House and a Republican majority in congress.

We can get a clear majority on the supreme court. We can get Roe V. Wade reversed and let the states decide for themselves on the issue of abortion.

It's going to be at least 4 more years before anyone tries to ban any guns.

We can breathe a breath of fresh air because the issues that are important to us are on the table.

The thing I like best about President Bush is that he's our Bill Clinton. No matter how much the other side hates him, it only makes them look worse. I was a dedicated Clinton hater. I even bought a bottle of wine that I'm saving until the day he dies. Now I can be as smug as the democrats were on Nov 3 1996.

Talk about a mandate to lead.

LK

User Journal

Journal Journal: US Air Force Thunderbird Crashes in My Back Yard 1

Ok, so it is actually 30 miles out of Boise.... But that is basically my back yard. Mountain Home AFB, being the largest AFB in the Northwest, is a pretty big deal here in Boise and when stuff happens there it gets attention.

Add to the fact that a guy I studdied Java with last night (for my class), was there when it happened and witnessed that crash.... that just makes it even more personal.

News articles were kind of hard to find (quite odd actually). National article is here and local news coverage is here and here (best coverage)

I have been to many many air shows. I grew up in Florida for 15 years next to Patrick AFB. I have seen lots of air shows. I have seen the Blue Angels and the Thunderbirds as well as the Snowbirds (realy stunning flight maneavures brought to you by the guys to the North).

With the exception of when I was real young and the planes were too loud for my little ears, I have loved every single one I went to.

jason

United States

Journal Journal: The US Constitution for 5th Graders

Coming to you care of NPR is an article regarding a new translation of The US Constitution...

for 5th Graders (or equal cognitive level people)

So this is an interesting idea, if for no other reason than to take away that pesky need to understand the English language. Should this be referenced when teaching about US government? If so, at what level do you expose kids to the real constitution? I found a link regarding a review of the book which may be of interest, as well as another site selling the book besides Amazon.

I have more interest in this version simply for its appeal to a casual read. Mind you, I'm not about to sit down with a cup of tea and have a go at the whole thing start to finish. But this sort of can only help with translating the subject of the document, if not the intent. I have not purchased or read this version so it is hard for me to judge their translation.

The book can be had for under $15 from just about anywhere.

Edit 08/18/03 @ 19.15 GMT:Also a link on CNN if you like.

User Journal

Journal Journal: For Reference:

Quoted from "Ungrounded Lightning (62228)" for reference:
==========
    - NBC is using Apple G4 w/Final Cut Pro and Discreet Cleaner.
    - CBS is using Windows PCs w/Avid (editing centers), Adobe Premiere (producers & photojournalists close to action), or MovieMaker 2 (for dumbkopfs?).
    - CNN and Fox aren't talking, and ABC's tech wasn't mentioned.

(Note that we'll probably be able to find out what CNN, Fox, and ABC used after the fact, once the info won't give their competitors an advantage.)
==========

I just wanted to make sure this did not disappear so I could refer to it later.

robi

Slashdot Top Deals

The question of whether computers can think is just like the question of whether submarines can swim. -- Edsger W. Dijkstra

Working...