Tuesday, July 17, 2012

Complete



As you can see, I added a little bit because I forgot about youtube linking. But tada, theres the input, a few button clicks later and the second image is what results. Cool right?

This literally took about 30 minutes or so to whip out. A simple iterator goes through the item lists (0000,242323, 2323) and makes the links to the SKU's. And besides all that its simple plug in play. A file stream and a stream writer object are all thats neccesary to use.

Also, I have it generate simple random file names by using the Path.getRandomeFileName() function.


Here's all the code in very zoomed out mode, 142 lines

SKU Maker Basic Interface

So I've finished up the basic interface design. I might mess with the color scheme a little to make it easy on the eyes, but now let the coding begin! I figure it will be fairly basic and easy. All I'm doing is generating some xml from the information I'm getting from my text boxes. The only thing that I'm going to probably have to watch out for is escaping special characters. 

Oh, and of course change the default form name to a good name for the program. Probably going to call it Sku Maker or something. Also I've been thinking about causing the add sku button to either just do a simple pop up dialog, or to have it able to read from Excel datasheets, because I do have a good amount of data in excel... we'll see how ambitious I am after coding the basics

New Practical Project

For an internship/subcontracting job I'm doing right now, I have to do a lot of xml. Most of it is the same, and only 4 or so things change for each item I work with. Copying and pasting everything is rather a bore, and clicking and highlighting what I have to change is also tedious, so I had a thought.

Why not automate most of it and put some of my skills to work?

The answer? HECK YEAH NEW PROJECT

Its simple and I imagine I can get done with it in a day or soon depending on how my other work keeps me. (Website work and actual support myself work)

I'm doing it in C# since the file capabilities are really superb in that language, not too mention using visual study means that I'll have an interface up really fast.

I'll keep you all posted!

Thursday, July 12, 2012

Object Oriented Approaches to Websites

So far this summer, I haven't had any superbly ambitious goals or projects like I did last summer. But I have been working on revamping a website with a friend. The website is for an organization we're apart of, myself being one of the people who run it, and him being next years definite choice for one of three leadership positions.

Anyway, we're working on the website, and we start to take an OOP style on it. Using database objects to handle database queries and information we need from them, specialized entry objects for the database objects to accept and play with. Validation objects that act as decorators on those entry objects to make sure they're not malicious and such. Its pretty fun. But sometimes I wonder if I'm going too far with it.

It makes sense in concept to do this. Have a simple interface for the database, with a few core functions exposed, and a sure fire way to have the data we need by using an object for the data structure passed around. But at the same time, making an object simply to hold data thats there anyway and then pass it along seems a little silly. But I mean, by making that object and passing it, you're guaranteeing that the information you'd like will be there to pass along to the database. It's nice. Reliable and definitely a bonus of the OOP design. Also, by enforcing a standard for our models in our MVC design, we make it very easy to extend the website by future organization runners. A few controllers and a lot of models work well.

I wish I had a project to keep my occupied though. I thought about an inference engine in ruby, but I'm not sure yet.