Sunday, April 1, 2012

About errors discovered the last day


As I said before, there will be no specific help in the last day before the submission deadline. Those who chronically start late and find out that they still have some errors or the programs do not work as intended in the last day will get low effort/merit grades in the course and run the risk of not completing the tasks despite my repeated advice to start early.

The main work in programming is in finding errors and making the code work – this is what you are getting your points for. Do not assume that what you write should immediately work and if it doesn’t  - then something extraordinary happens. The code normally results in errors and the programmer has to debug it.
Here is general advice  as help for the last day: In this course programming is largely simplified (compared to the Java course) by the methodology where you are getting working snippets of code or whole programs and just have to “personalize” them. It means that most of the time if you get a syntax error message or the code doesn’t work – the error might be only in a handful of statements where you ”plug” YOUR OWN information. In this week’s case: DEFINE statements, the table creation statement, and INSERT statements. This is what you should check for errors, compare the syntax (commas, semicolons, quotation marks, etc.) with my examples and syntax explanation from the textbook. Read all posts in Q&A since they are for all students.

Those who start early and run into errors that they cannot see, usually get general advice in Q&A (please do not show code and ask other students to debug it for you). You also get specific help from me (showing where the error is but, still, without me correcting it for you – otherwise I cannot give you points for debugging) as many students do. The late starters run high risk of not having working programs and getting zero points for not bneing able to debug the handful of statements with personalized code. They also run the risk of failing the following week’s tasks since they usually are based on the previous weeks (like in week 9 the possibility of getting fields from the form and storing them in the variables of PHP that then will be used in the INSERT statements for user-supplied information – is based on the work of week 8 and READING recommended material from the textbook on how the variables (not the constants!) are plugged into PHP/SQL statements).

Those who will not be able to complete the work by debugging the errors should email me their godaddy login info along with database login info if they want me to show were the problem was. If it has been done in the last day - I will still show you were exactly your errors are (but only after the deadline is over and you are graded), so that it will not affect the following week. If you do not read the textbook and recommended Web material  - you will still run high risk of not being able to understand how to use the previous week in the next week’s tasks and your project – so re-read the material to really understand how it all works (not just copying my code).

Please realize that despite the fact that you can be getting much more help in this online course than in classroom settings, since I am available 7 days a week and can closely work individually with your problems offering advice and help in programming  (what a number of students successfully use), the lack of desire to apply yourselves by starting early and spending enough time on reading the recommended material, which explains the meaning of every statement and used techniques, might lead to poor results in the course. Very little time is left in this course to correct your mode of work and show good effort. Use it!

Wednesday, March 14, 2012

Processing fields in PHP

I noticed that some students are trying to refer to the form fields by their names in the php form processing program. You cannot do that and have to refer to the variables by also mentioning that the system has to get them from the POST flow that you use to post your html m to the server for processing by PHP.
Therefore all names from the html form will look like $_POST["your field name"] and should be addressed in such way (with added prefix $_POST[...]).

Tuesday, March 6, 2012

Ajax in Projects

In week 7 (Ajax) you will learn how to support the ability of various areas on the page to live their own cycles with own small roundtrips to the server. This makes a Web page something very different from what it was seen before.
Week 6 had a goal of allowing you to understand how to manipulate the XML (and HTML) information delivered in various ways (including Ajax - where in week8 the focus will be on the delivery mechanism). JavaScript can analyze and modify documents delivered to the client in all possible ways. This is a good mechanism of adding your interpretations, design, filtering and additional content to the XML and html files that do not have to be delivered as tables but after you get (via DOM/JavaScript) the info - it can be shown in some nice html/css format with additional text. W8 shows how to get those files (XML, HTML) for THE FOLLOWING JavaScript processing - this is a good way of project enhancement of the simplified labs. You can get an XML file from the server and then parse its DOM by JavaScript, get the necessary info out and present it in a nice html/css.

Thursday, March 1, 2012

More on W6 Labs


To summarize what is happening during the labs and how XML DOM works with javascript:
1. Loading XML documents by XMLHttpRequest() or by ActiveXObject("Microsoft.XMLHTTP") with a few supporting operations (that we will learn in detail when we get to Ajax) sends the request to the server and gets the xml file (if you are trying to get an xml file).
2. The main focus of this week is in what you can do with this xml file using JavaScript and XML DOM. Here important to understand that JavaScript works on the client and whatever it does – will not change the original xml file on the server. It changes only the file loaded into RAM for further processing and presentation. Here JavaScript and XML DOM can allow you to modify the received document and change its presentation in any way you want.

W6 XML Labs additional info

I noticed that W3Schools site doesn't clearly state in large print that you should run loadxml() function and all your examples on any web server but NOT ON YOUR LOCAL FILE SYSTEM by just clicking on the html file. For example, you can use Web server from phobos by uploading all necessary files (your html file, xml file, and js file with loadxml()) there and running them from the phobos-based location.

Monday, February 27, 2012

Approach to your term project development

Read here about Agile approach to your term project development efforts that you are learning in addition to various technologies.

Wednesday, February 22, 2012

More About Project

As I described in the tasks, your site (AT THE END) should have all your programming technologies that you will be learning in some form. But… this will be achieved gradually, by adding new elements with these technologies to your site. At this point, having a front page from any free template site (like the one I showed in W5tasks) and tweaking its content will satisfy week 5 tasks. Do not worry about what is on the Project site now. Just choose the Project concept and what it will be about (some form of e-commerce may be will be easier to fit). You will be more closely working with the site in the following weeks using special Project tasks that will be telling you what elements should be added to your site.

For example, the next week you will have to add at least one of the pages connected to the front page menus that uses embedded and external CSS files (or show how you tweak the css file that came with the template site). Then you will have to show some use of javascript on at least one of the connected to the menu pages (could be the same that shows CSS use). And then in a similar fashion you will be adding technologies learned in the following week. Do not try to design it all now. It will be a dynamically growing project along with your learning of the new material (this is a modern way of designing complex web systems). The requirements/tasks of what technologies should be added to your site (in any from you will choose) will be given each week.

For those who do AWD and TEB projects together – do not try to integrate both parts too tight. It is more work (but, of course, more elaborate integration will be worth more). Best is keeping them separately as supporting resources for each other and simplify the integration like having a menu link from ASP page to the page sitting on the TEB site and vice versa. The user shouldn’t care where the pages are coming from as long as links work. All the code should also work when called from proper pages and the visual presentation of pages should relate to the same Project topic and preferably using similar style. Then it will look like really One Project. But, of course, you might choose to do the same Project Idea as two different sites (for AWD and for TEB) with two different types of technologies (and this might be not that much more work too, and may be even easier to implement).

But, again, my advice is to keep the development, AT THIS point, separately in terms of technologies and just watch for the content and functionality supplementing each other to be used for cross-references later. For example, you will learn Master Pages in ASP.NET, that will do similar stuff as template pages in TEB. These should be kept separately to show that you can use both methods.
You will learn down the road that the site/page that you use on your screen could actually be a bunch of pieces coming from different places and updating themselves at different times, but… this is later not to overwhelm you now.