Showing posts with label homework. Show all posts
Showing posts with label homework. Show all posts

Saturday, November 15, 2008

Final Project : The Client

Drum roll please ...

I'm going to kill two birds with one stone here and my final project will also be the next paying job I have lined up.

http://kasthomes.com/ - A real estate development company

I've done some preliminary meetings with the client and will hash through those notes and create:
  • site maps
  • wire frames
  • process flows
  • user paths
  • functionality charts
My issue in the past has been to plan too much. I'm not going to worry about the smallest details too much because frankly I can't perceive them all till I get dirty and the client isn't being too informative. I image we will both define the specific as the process moves along.

There will be communication with my client throughout this process as well. I'll do my best to share the complete process with you all. Hope you have some comments and suggestions of what I share.

db

Friday, November 14, 2008

FInal Project : Site Structure Full Overview


I've had this idea for some time now as I have a lot of friends and small clients that could fit into this structure in one form or another. I think it would be awesome if I could build a structure for most of the possibilities and pick and choose the blocks I develop for a final project be it for an individual or small company.

I've have used Wordpress for this stuff and it is a powerful tool. With tools like that I wonder why try to do this from scratch myself but all in all it would be a great start to a product I may later turn into a Wordpress theme.

No matter what version of this site structure I come up with in the end for my final project, this was a needed step in the process.

Next:
  • I'm going to take this and define all the possibilities for each kind of page template with a specific client in mind for each pass. Fashion Stylist, Painter, Web Designer, Advertising Agency, Property Developers, Real Estate Agents...
  • Once I define 3 or 4 types of portfolios I'll wireframe the one that works for the final project.
  • In the end I need to decide if this is for an individual or small company and what kinds of bells and whistles I can do by the deadline.

Thursday, November 13, 2008

MySQL Reading : Notes

I just completed the MySQL Tutorial and these are some notes related to the reading.

For the first half of the tutorial I followed along by creating a database and different tables on my own server. We did most of this in class but it was helpful to do it again and sometimes with a different method... like creating a table from using PHP and the "CREATE TABLE" MySQL query function.

The tutorial doesn't mention anything about Foreign Keys or even Primary Keys for that matter. The only mention of two table relating to each other was through Join or Left Join. The tutorial admitted you probably wouldn't understand join from the super simple example. In some other reading I'm realizing Foreign Keys for MySQL have to be assigned by command line as there is no graphic interface for this. I've only worked on this weeks homework assignment for a few hours and I'm having a big issue with table relation.

In practice I brushed up on my formatting of the result and syntax of PHP but I still get a lot of totally blank pages with no errors. Very frustrating. I'm guessing that is due to poor syntax. Debugging methods aren't helping either. Lot to learn still.

I found SQL Injection mysql_real_escape_string() interesting in part because this process of protection is used when running a query for results. In short used when getting data and it kept bugging me that this isn't used when inserting data to the table. Actually I think I'm mixing up the PHP process for sanitizing the user input and the SQL process for making sure nothing malicious is run on the database. Does SQL even have protection on INSERT?

Well, on to defining my final project and getting that blog to work correctly.

Friday, November 7, 2008

Class 07 assignment -5 - Well...

http://onepotcooking.com/davidbone/class07/3/

I updated the above
  • I added the Lightbox2 functionality to the gallery page. Click on an image and you'll see what it does... well, after the page loads.
  • In implementing the lightbox I only wanted to update one page so coded the header into a more template friendly fashion and added a footer for each page. Also coded a dynamic class for each page which would be very helpful in the CSS if needed.
I asked some friends to waste some time in the office and test it and sadly I realize this only works in Firefox. Well the uploader doesn't work in IE and I'm not sure why yet.

UPDATE:
I was able to get the uploader to work by putting back in a file type I didn't think was supposed to be there and that is "image/pjpeg"

Class 07 assignment - 4 - It's all workin'

There is always more to do... but for now I'm happy. Especially happy to be finished after yesterday I completed the project then promptly proceeded to delete all of my work. That's right I pulled a Homer and had to go back a days work! You would think I could have just whipped up the code again after completing it once but no I still didn't quite understand. I think I do now :o)

For you to test (please) onepotcooking.com/davidbone/class07/3/

My toDo list since last post:
  • Get the home page working with gallery
  • Limit the view to last 50 (thanks JackP, who also alerted me to array_reverse)
  • Design the layout + figure out thumbnails
  • Work on security which is non-existent at the moment.
  • Test the limit on file size upload. I don't believe it is working. I was able to restrict the size of file and type of file
  • Template the error messages onto one location like I saw Jonathan do... good idea.
  • + Figure out true thumbnails. Creating and saving on the fly.
Assignment 07 Notes:

page_login.php
  • Checks to see if you have a cookie that has you logged in. This cookie expires in 24hrs.
  • Post form for entering in username and password.
  • On form submit with values: reads the data txt file for username and password and if matched then sends user on to gallery page. If no match then there is an error message. Also sets two cookies. One for loggedin and one with the username.
  • On form submit with no values: error message
page_newmember.php
  • Checks to see if you have a cookie that has you logged in. If so, on to gallery page.
  • Post form for entering in new usernames and passwords.
  • On form submit with values: writes entries to a txt file in a comma delimited fashion. (no security on this yet). On success of writing to file, send user back to login page w/ message.
  • There are other error messages (alerts) related to txt file but most likely will never be called unless there is an error on the server.
  • On form submit with no values: error message
page_home.php
  • Checks to see if you don't have the needed cookie. Send user to login if failed.
  • Personal message to user from username cookie.
  • Gallery of images. Showing only latest 50. Showing last entry first.
  • Thumbnail size controlled by CSS.
  • All images link to the full size.
  • Alert message when successfully uploaded an image
page_uploader.php
  • Checks to see if you don't have the needed cookie. Send user to login if failed.
  • Post form data entry. Writes the file path, caption, username and date to a txt file for gallery page to read.
  • File upload field is limiting file size to 2M by a hidden form field and php. The php also restricts file type to gif, jpeg, jpg or png. (The method from Amos, restricting the file size, didn't work for me)
  • Only the image is required.
Coding Observations:
I feel like I'm in the Matrix movie where all those lines of "code" are on the screen and to the learned eye, you can visualize what's going on. Still at low resolution though.

File management was a desire for me with folders for includes, functions, style... Because of this I came across path issues. When a function writes to a file it would have a different path than the other function that would read.

Testing is where it's at! Many examples of me learning through testing but the last run through revealed I forgot to check for empty form fields when entering the site. This resulted in one of my cookies being set and letting the user in but it didn't set the second one. Because this second one wasn't 'on' I saw behavior from my code that I didn't realize was there.

I learned a ton, especially since I did just about everything repeatedly. I still see myself looking for answers out on the web but now it's more for reference than for stealing.

Syntax is still an issue for me... that is where practice comes in.

Wednesday, November 5, 2008

Class 07 assignment - 3 - Did I say, "Almost Done?"

Moving along but like the Tortoise.

Working files at this point are here onepotcooking.com/davidbone/class07/2/

Coding Observations
  • I like my file management to be consistent. Because of this I had some issue with file paths and in particular the image path for this project. I was looking for a way to set a base directory for the whole project and have all links start from that point. I didn't figure that out but I did break out the paths in the variable definitions because there was a different path for moving the image file compared to writing the image file's path to be read later from a file at a different folder level.
  • Arrays are huge and very important in the loop. I need to understand these better as I needed to look at other's code to get it... thanks again Jonathan.

My toDo list since last post:
  • Get the home page working with gallery
  • Limit the view to last 50
  • Design the layout + figure out thumbnails
  • Work on security which is non-existent at the moment.
  • Test the limit on file size upload. I don't believe it is working.
  • Template the error messages onto one location like I saw Jonathan do... good idea.
I'm doomed - HA!

Tuesday, November 4, 2008

Class 07 assignment - 2 - Almost Done

onepotcooking.com/davidbone/class07/

I have the home page gallery listing left to code. All else is working pretty good but wouldn't use it on a live site.

Would like to do still:
  • Get the home page working with gallery
  • Limit the view to last 50
  • Design the layout
  • Work on security which is non-existent at the moment.
  • Test the limit on file size upload. I don't believe it is working.
  • Template the error messages onto one location like I saw Jonathan do... good idea.
Hope I can get this completed tonight... I've got real work to do ;-)

Where to code : Appending the upload content

I could use a suggestion:
I'm to the stage where I'm trying to get my image path, username and caption to write to a txt file. I'm able to print those variables to screen but not to the file. I'm more than certain it isn't a file permission thing because I created an else in the loop that would state an error but the code isn't getting to that point.

Right now my result is a blank screen and I know it is due to the highlighted code in the following image.

Is this the correct place to try to code in a fwrite?
I figured if the image file could be moved to also write to the txt file in the same move_uploaded_file function but maybe that is incorrect.

Does anyone have some incite?

Class 07 assignment - 1 - Progress

I've probably put in 9 - 10 hours already. Designing the XHTML & CSS as well as learning php for this assignment.

My files are temporarily working at this location www.bonestructure.com/webdev/

So far I've created the functionality for all pages but the uploader. I have had each element working at one point but now I find some weird behavior I can't explain. When I write to the text file on the Become a Member page, it is always writing "david" as the username and writing in the correct password. This is very bazzar as I've never hard coded my name even in testing any elements. I'm at a loss and will come back to it. Not sure how well it will test for you but go for it if you so desire. I do know "david" and "bone" work for the username and password.

Still to complete
  • Fix the writing to the text file.
  • Figure out the uploader (have had tests working but my current build isn't working)
  • Figure out the Home page (gallery of uploads) from the uploaded data. How to write to the page in a formated style and repeating. I would like to keep the uploaded images to a max width and height in the display grid.
  • Figure out how to show only 50 of the latest elements.
  • ...
Coding Observations
  • There seem to be these two ananomous session cookies ("PHPSESSID") that I can't figure out where they are from and if they are affecting the functionality. The show even if you only hit the submit button.
  • I've been using isset for checking if the Cookie is there and I thought unset would turn the Cookie off and delete it just like setting the Cookie again by writing over any previous values. Well I found the unset will return a false for the cookie but it won't delete it. So on that page I used unset, the Cookie would return false and I would see the desired results but if I knew a link and just jumped to it (say I jumped over the login page and pasted in the home page link) the Cookie that was floating around would still work on that page I jumped to.
  • In the progression of building I came across a procedure I liked by accident. I have the "become a member" page passing a username and password, that username is used on the Home page but the home page also checks for a true Cookie which is only set on the Login page, so then the user is automatically sent to the Login page. In short, the new member will submit and then sees the login page. It happens so fast and the two pages are designed so similarly that I didn't even notice the behavior at first... I'm going to have to redesign the Become a Member page a little.
I have to get some Zzzz so I can vote bright and early tomorrow.
L8r - dbone

Friday, October 31, 2008

All class assignments are in right column of my blog

Top of the row.

If you select the tag "homework" there are blogged details for the assignments.

Monday, October 27, 2008

Class 06 assignment - PHP Ecomm Product Page

Class 06 Assignment Files:
Accomplished:
  • Took my concept from this page
  • In class completion of the PHP
  • Applied imagery and content replacing all dummy placeholders.
  • Created banners for all slots.
  • Fixed the flickering per Amos' solution (thanks!)
  • Fixed the CSS so it all works in IE7 and Firefox and updated the CSS to work with the new thumbnail dimensions.
For the next iteration:
  • Info divs need a bit of usability and design work
  • For that matter the whole thing could use a bit more design work... if I'm to compare myself ;-)
Overall I'm pleased with the result. I know there is a lot of practice still and I need to keep my feet wet through out the week to stay sharp for the next class... and pop quiz!

Billing / Shipping Form - V1

I've completed (finally) my first javascript assignment viewable here.

On that page you can read what I did in detail.

I referenced for this version:
I didn't just copy and paste but rather I made a lot of little mistakes writing along the way and sometimes I got some funny results instead of just errors. I'm still having a bit of trouble even though this looks successful. I tried some of the "Ideas for Javascript Practice" ideas you will see listed on my homework page but just couldn't make any of those work using the references I found. If you have any suggestions as to what you would do, I would appreciate that. I suppose I need to go back to do some reading as well.

So this week I plan to still:
  • Style my PHP ecomm product page with a fish aquarium store vibe.
  • Try a couple more versions of the form with javascript and php.

Friday, October 24, 2008

Class 05 assignment - 03 - Like OMG! It's Working!!!

First I owe my thanks to Sharron. Her procedure was a lot like mine and reorganizing my code to reflect hers was the answer for me.

My solution was a branch off of the previous post's links which I dearly want to know what I was doing wrong with.

Class 05 Files: (new)
Coding Observations:
  • There is an annoying flickering going on. I'm out of time to figure that out but maybe I'll figure it by looking at a previous post I saw.
  • I still can read better than I can write and I'm having a hard time understanding how some variables are associated with different functions... but somehow I know they are.
  • I see how programmers have a personal style to coding with all the different ways we each solved this problem.
  • I'm at the belief now that defining vars is the key. Where each step in a function is achieved by taking the result of one function and defining a new var to perform yet another function. Probably not making sense here but I see the steps in the code but am still challenge when conceiving on my own.
  • I believe I need to read read read and do small tests if I'm to really to code javascript on my own. Not sure that will be achieved in this class but this class is certainly helping me get there.
OK. off to get ready to VJ a Bollywood Disco event all night... learning PHP tomorrow!... not helping my chances with PHP am I? ;-)

Class 05 assignment - 02 - progress but no success

Class Assignment 05 Files:
About the layout:
  • This time I noticed my br class="clear" were creating space. Not sure if that was the case previously but this time I just added margin and padding 0 to solve it.
  • Top navigation I made close to the wireframe mockup where it spreads out over the width of the container. I only found this to be achieved with exact pixel knowledge. Percentages didn't work but maybe they could somehow.
  • The layout looks the same in Firefox and IE7. IE6 needs a little work.
About the Javascript:
  • I just can't seem to figure out how to relate the positioning. Maybe I'm doing it correctly and the issue is in my CSS. I really can't figure it out by noticing the results I get.
  • There are a few people I have followed and I like how each person did it differently. At least I know there isn't one set way. I think I know what I'm looking at but don't seem to be able to translate that to my method.
  • I've spent about 15hrs on this project! I have a few more hours to figure it out today.
  • I'm very frustrated and have a bunch of doubt at the moment.

Wednesday, October 22, 2008

Class 05 assignment - 01 - Still working on code first

I've only messed with the programming earlier this week, with little success. My first tests reside here. You'll see there that the divs appear and disappear but not in the correct location and there is flickering like I saw in JoelL's progress.

I to am very confused right now but I know I'm not alone and am hopeful I'll be able to do more than read javascript. Need to practice. One thing I find hard about javascript is that I don't know what I'm doing wrong when something doesn't work the way I want it to. I can't see what I'm doing wrong. I'm realizing how much of a visual person I am and when I see something goes wrong in XHTML or CSS it's easy for me to fix it. Each week there is a little clarity but I really have to dig in to the treanches and figure this out. I really want to get over the curve and start to cruise.

I see that Janet and Jack P are doing well if anyone needs a reference. I'm sure there are more of you too of which I will be digging through your work soon.

Time to code!

Friday, October 10, 2008

I'm a little dizzy

Q: Who took a break when they read the line, "Do You Remember Algebra from School?"

My first pass through the basic Javascript tutorials was a bit like the spinning teacup ride. At moments I had bits of clarity but then as I kept reading and practicing it all came to have the same blur. This will definitely take some practice to get under control.

Although one thing I'm grateful for from the reading, is being able to read the javascript with more certainty/clarity.

I can taste the form validation excersise now... or is that cotton candy?

----
On another note, I went crazy with the design on my homework. Check out previous post for links to XHTML and CSS. I commented my CSS a lot if you use it for reference.

Wednesday, October 8, 2008

Building Web DIrectory : 2 : Almost Done

The image shows where I stand as I write this post.

As posted before, view the build or the css for this homework assignment.

OBSERVATIONS

The screen shot may not look much different than my last progress report but holy cow have I been messing around with the css. I had wished I saved versions along the way because I had come to a point that produced some very weird behaviors and had to try to figure out what I did wrong. Whatever I have now is it. I will update a little more of the information but at this point I believe I've fulfilled Amos' requirements and I still have javascript to read about.




Some things I tried:

  • Top navigation where it says "login" is a div inside of the container but shows outside of the container. This was achieved by top:-15px; position: relative;. But I had to give it a height less than the content to keep the H1 header "NYU Web..." in place. Not sure if this is a good practice.
  • The sun logo has a rollover transparency. There were some weird issues with this in PC and it drove me nuts one night trying to figure it out. Never did. For PC, the navigation may dissapear when you rollover the sun. Weird.
  • The top H1 header has a semi-transparent .png file for a background. This doesn't work in IE 6.
  • In Firefox the form input has a background color when you select it. This doesn't work in IE
  • The middle navigation is over the photo but that div is outside of the header div. I achieved this also with a negative and relative css value but the resulting space under the photo is where the menu should be. I could give the menu div a height less than the content but that would result in the bottom border moving.
  • I really studied the list properties and behaviors in depth. I previously posted some observations.
  • I don't really see the need to do any CSS like this #container > div > h1 BUT since it was a requirement it got me thinking and messing around. I found this on the web related to selectors but it's a little over my head at the moment because it is related to the DOM. I wish I could have that kind of CSS control just in the css file. Can I?
  • If you're still reading I'm surprised :-)
  • I would've like to have all the columns with the same background but don't want to use the height property and no other idea is coming to me.
I think that is it but may have more notes in class.

Monday, October 6, 2008

Building Web DIrectory : 1 : My Progress

The image shows where I stand as I write this post.

As posted before, view the build or the css for this homework assignment.

What I would like to do yet:
  • Top access menu for login (not in wireframe). Try an in line list with position:absolute or fixed
  • Home Page with login info (last idea to implement)
  • Student Page with my info (in my view the homework is for a student page)
  • Main menu design with tab top left corner. If I'm feeling really ambitious test out an image navigation the way I found on Ikea's web site.
  • Figure out how to get the backgrounds of the shortest info columns to be as long as the longest info column for each row.
  • Finish filling in the information.
  • Style the main content.

Some Observations

The top nav list is almost exactly the same for IE7 and Firefox (it may look the same to you but there are a few pixels difference). In achieving this I'm afraid I've written some congested css code.
  • For one, the visibility:auto property for the header div has to be there for the navigation not to disappear when the sun image (logo div) is rolled over. What? I know, that is what I feel right now. If this was for a client I'd figure out why but for now I'm happy it just looks decent for those two browsers.
  • Maybe I'll rewrite the top navigation to be at the root div level and then position it absolute to the container div. Would that place it in the exact same place in all browsers or will I need to find a way to do position:fixed? I have to admit I'm getting a little too focused on the navigation placement.
In my web research for lists, I was surprised to realize the solutions I have been copying in the past don't even use the inline value but rather float li tags to the left to get the horizontal menu. I suspect this is so because each browser has a different rendition of the basic list as I pointed out a previous post about list observations and we saw in class. Maybe I'll post some links about lists if anyone actually reads this and is interested.

Last but not least I'm finding this a great way to procrastinate from the work I should be doing ;-)

Sunday, October 5, 2008

White Space Visible for Inline List

I'm very curious if anyone is noticing this behavior.
I am noticing the following for inline lists. I've taken screen shots of my observations which follow.
  • Red backgrounds are the a tag
  • Yellow backgrounds are the li tag
  • In Firefox the li only spans the same space as the a tag
  • In IE the li spans beyond the a tag (visible where the yellow is)
  • I tried putting padding:0 & margin:0 properties on every part of the list to get rid of the space between the a tags in Firefox and to get rid of the yellow li space in IE. No luck.
  • The only way that I seemed to be able to get rid of the space between the list entries was to code it with no white-space. I even tried the property white-space:nowrap... no luck.
  • I have never seen this before and am wondering if the strange behavior is because of some preference in my application set-ups. Does white space really matter in XHTML?
PC Firefox Screenshot

PC IE Screenshot


HTML/CSS Code (click to enlarge and notice the two ways the UL list was written)

Does anyone see an error in my css?

Saturday, October 4, 2008

Class 03 - in class assignment & homework

Assignment link to Amos' wireframe

HOMEWORK
  • Finish building the wireframe for next week's class including imagery (design).
  • Read W3School Javascript tutorials
  • Be ready for a quiz

To view my build visit these links: