Getting started

This week was fairly productive. While I might not have to much to show for my work, I accomplished a good chunk!

I have created a very simple web page using HTML5, CSS, and JavaScript. I learned how to format the page and create a basic layout. I have also created my own github repo where my code is being stored and I can now access it using there software on my computers. I have tried and succeeded at creating the test phonegap app. However, I’m still having issues with phonegap.

Phonegap seems like it will be very helpful to get our job done. There are some weakness I can see from using it so far though, and coding hasn’t officially begun yet. Hopefully we’ll be able to avoid any headaches. The first issue that we should be able to fix soon is that we don’t have a key yet to compile down and test any app on an iPad. This is a major downside right now. The other issue is, I’m still having trouble getting phonegap to recognize files that need to be converted. All phonegap asks for is an HTML5 file to convert to an app, but I’m finding that it won’t compile mine. Maybe it is an issue with me syncing up my Github files. Also, once it is compiled I have no way of testing it now since we can’t use an iPad and I don’t own an Android tablet device.

More to come in the future! Hopefully the effects of the blizzard won’t get in the way of this week.

From the blog Sean » cs-wsu by shorton1 and used with permission of the author. All other rights reserved by the author.

Development Week One

Hello again,

So it’s been a crazy week, I spent countless hours trying to figure out how this whole html5, css, and javascript project thing works.  Who would have thought it would be so confusing, just trying to figure out how to set up a test project?  To only then realize you were foolish for ever thinking it was difficult.  Great, right.  I guess what I am trying to say is things are progressing steadily though perhaps not as smoothly as  I had originally intended.  
    This past week, I scoured the internet for every fragment of information involving coloring to an html5 canvas I could find.  Ah, that reminds me, this week we chose teams for our Worcester Art Museum project; I chose to be on the coloring book team because I thought it would be challenging but fun as well.  I am delighted to say there are a vast amount of web development resources available on the Internet.  I found a tutorial that helped me work through some of the html5 canvas basics, but after detailed study into a few of the subtopics, I opted to change a vast majority of the code I started with.  
    One choice I have made is to avoid jQuery, I know what your thinking why?  jQuery is so useful.  Especially know that I have learned “how all the cool kids call jQuery” a quote taken from some random site, for an idea which they in turn took from the widely known boilerplate template.  Let me explain; it may come as a surprise to some, perhaps not many, but jQuery is nothing more than a javascript file with a vast amount of helpful tools; about ten thousand lines of tools, uncompressed.  However if you only need a very small portion of the library it make more sense to make up your own solution, rather than sacrifice load time.  Or at the very least just take what you want from the jQuery library.  Probably no big deal if your on your own laptop, but everyone browses the internet on their phone know so performance is key.
    Any way now to the progress.  This week, I designed a very simple coloring web page based on html5 css javascript and jQuery, which I later discarded for the homegrown solution, no jQuery.  Thus far, as of friday night 2/8/13 I have a fully functional drawing to app which draws whether you click the mouse or not, functionality lost to the abandonment of jQuery, but soon to come back, …just saying. With a palette of nine colors and an eraser I call the refresh button lol, me and Beto; my team partner a poised to strike a blow in the name of free source code.  
    I must say it is nice to finally work on a project that has a value to the public.  I suppose the only thing that brought my pure jubilation of having a working webpage back to reality, was when I gave it to my daughter to test. Within ten seconds she asked where is the eraser, to which I replied just hit the refresh button and be quiet.  She’s five.

Till next week.

Jason

From the blog jasonhintlian » cs-wsu by jasonhintlian and used with permission of the author. All other rights reserved by the author.

MySQL Lite Database & Javascript research

So far our team has decided to look into the possibility of running our app for the Worcester Art Museum on top of a SQL Lite database, after doing some research into how to use and manage a SQL Lite database it seems like it would be a decent idea, so far our concern with this is whether or not PhoneGap will support this type of database. I’ve done some research on the commands for creating and managing the database and it seems like I will be able to pick this up very quickly.

In addition to my research on the database I progressed with my learning of Javascript and ventured into the world of Objects; which thankfully are very similar to Java objects, at least in my mind.

From the blog CS:401 » CS-WSU by dcarlin2013 and used with permission of the author. All other rights reserved by the author.

CS-401 Week 3

This past week, there were some complications. I could not make it to class on Monday due to some car troubles. My car had to be brought to the mechanic, and I did not have another way to get to the campus. I read online that we were breaking up into groups this week, and later on in the week I talked to a few classmates about the database. I feel that I will most likely be joining in with this group. This was not a very eventful week for me, seeing as I could not make it to class. Other than this, during the week I looked at some links that Professor Wurst provided. This coming week will be much more productive.

From the blog bchaban » cs-wsu by bchaban and used with permission of the author. All other rights reserved by the author.

Puzzle Activity

Myself and two others have decided to work on the puzzle that will be part of the app for the Idea lab at the Worcester Art museum. This week we have decided to research different ways we could program the puzzle. We have found a few different languages that will be useful!

One of the languages we are thinking of using is JQuery. We will use this to actually make the jigsaw puzzle. This language has a lot features that can be used to help build a jigsaw. When I learn more about the language I will post more on how we will be using it and if it really is helpful!

We might also look into using PHP because PHP helps split the image up before we put it back together. These are just a few of the ideas my group and I have been throwing around. For this first week, we mainly have been researching ideas on what will be the best way to program the puzzle. Next we will most likely start trying to come up with a program that maybe will outline the puzzle, for the outlining we are most likely going to program it in JavaScript and HTML5.

From the blog klentblog » cswsu by klent22 and used with permission of the author. All other rights reserved by the author.

More Research on Puzzle feature

Did a little more research and found someone created one using HTML5 and JavaScript to create a jigsaw puzzle for the web. I am thinking the best route will be using JavaScript and HTML5 because like in my last post JavaScript has the snapfit feature which will be helpful for younger children using the application.

If anyone is looking to use PHP (jQuery) in eclipse I downloaded Eclipse Helios PHP which has plugins for those librarys. I looked for plugins for jQuery on Eclipse Juno and was having no luck. I then found they had a Helios version and installed that to try it out. Just if anyone is thinking of using jQuery.

From the blog rwilliams5262 » cs-wsu by rwilliams5262 and used with permission of the author. All other rights reserved by the author.

Puzzle Activity Research

This week myself and 2 other classmates selected to work on the Puzzle section for the WAM Idea Lab Application. I started to do a little bit of researching on what it will take and what languages people have used to create similar application features such as puzzles etc. I noticed a lot of people used jQuery, JavaScript, and HTML5 to create this feature. Just going to describe some of the examples I found.

jQuery: After searching a couple different sites, I found that jQuery has a library such as: jqPuzzle. This library within jQuery lets you bring in any image as a .jpg and it will create a sliding image to make a puzzle. It seems pretty straight forward once you call the jqPuzzle library inside the code all you need to do is then apply the class to any image to use theses features. Basically this sort of library will allow you to slide images around inside the square until the image is complete. It is not like a jigsaw puzzle where you can move images anywhere you would like and they would have a snap fit when they are in the correct location.

(Ex: <img src = “apple.jpg” alt=”Apple Logo” class=”jqPuzzle”/>

http://www.jqueryplugins.com/plugin/81/

javaScript has a tool called snapfit.js. This tool could be used to snap the image to the correct location when they are in range. All you need to do is set the snapfit on the image. It is a fast and easy way to work with any image. This tool does not  need any other resources to run.

http://www.netzgesta.de/snapfit/

I think theses are some good tools to be used within the code for this feature and I feel that the snapFit feature will be the most efficient for the children using it because when the certain piece they are moving is close to the correct spot the piece would light up green and then snap to the location and if the image is in the incorrect spot it would highlight red and they will have to re try that piece again.

Just a couple ideas that should be thought about. I know we said we be using JavaScript, HTML5, and CSS for this application. But I think we will need to add in some jQuery libraries to be implemented with the JavaScript code.

Will post more when I get in touch with the rest of the group.

From the blog rwilliams5262 » cs-wsu by rwilliams5262 and used with permission of the author. All other rights reserved by the author.

I built my first PhoneGap app!

My CS 401 Software Development class for Spring 2013 at Worcester State University is developing an iPad app for the Worcester Art Museum (more on that in another post.)

Because few of the students have Macs the development environment was going to be a problem. There was the option of using either WSU’s or WAM’s Mac labs, but I figured that the students would want to work outside of the normal hours of the labs. Fortunately, Stoney Jackson at Western New England University suggested that I look into PhoneGap, a free and open source framework for developing cross-platform apps using the web technologies HTML, CSS, and JavaScript. PhoneGap will take a site developed using those technologies and compile it into a native app on a number of platforms, including iOS.

Even better, Adobe, which now owns PhoneGap, has set up a build server. That means that we can just have their site do the build, rather than having to rely on the few students in the class who do have Macs to do the building. To use it for free, your code does have to be in a public GitHub repo, but we were going that route anyway.

Last night I decided to do some more reading on PhoneGap, and discovered that it’s really simple to build a working Hello World app using their Getting Started documentation and GitHub respository of code. I forked the code, and submitted it to the build server, then downloaded the working app to an Android tablet. I wanted to download it onto my iPad as well, but it seems that I’ll have to go through the Apple developer provisioning setup to get a key. I’ve done that before to work on a native iOS app, but I’ve got to go dig through all my notes to get back up to speed on that process.

I decided to write up this post so that my students can see the steps I took, and get the example working on their own systems. This is pretty much just what is posted in the Getting Started page on the PhoneGap Build site.

  1. Fork the https://github.com/phonegap/phonegap-start repo. The fork button is in the upper-right hand corner of the page (https://github.com/phonegap/phonegap-start/fork_select).
  2. Go to your own GitHub page to see the repository you just created.
  3. You can clone that repo to your local machine if you want, but that is not necessary at this point, unless you want to make changes. I decided to leave making changes until later.
  4. You will need the http URI for the repository, so either copy it or leave the page/tab open.
  5. Go to the https://build.phonegap.com/ build site, and choose the Completely Free plan.
  6. Sign in through your GitHub account.
  7. Click the +new app button.
  8. Make sure you’ve clicked the open-source tab.
  9. Paste the URI from your fork of the GitHub repo.
  10. Click Ready to Build.
  11. When it’s done, click the appropriate device icon to download it to your device.

Next steps for me:

  1. Make some changes to my fork, build, and download again.
  2. Figure out the iOS provisioning so I can build and download to my iPad.

We’ll have to figure out how to set up the provisioning for the class after we determine which iPads we have available (student- and/or museum-owned) for testing.

From the blog On becoming an Eccentric Professor... » CS@Worcester by Karl R. Wurst and used with permission of the author. All other rights reserved by the author.

Using GitHub with SSH

If you’ve noticed, GitHub offers three ways to access a repository, two with read-write access and one with read-only access. For this project, each user is granted push-pull access (read-write) so eac of us can contribute code. The two methods which provide both read and write access are HTTP and SSH.

Using HTTP you can download an application and gain access using your GitHub credentials. As a member of the project you’ll be granted write privilege with these credentials (the project is open source and therefore, anyone already has read privileges). 

The other option is to use SSH, which allows you push and pull directly from the command line. In order to do this, however, you need to copy your public ssh-key into the ssh section on your GitHub account. Once the key to your computer is in the settings on your GitHub account you’ll be able to push to the database.

Once I have some more time to sit and work on it, I am planning to provide some steps to accomplish this. I thought having the information now would be helpful for those who would like to look into it more individually.

From the blog CS 401 - Object Oriented Design » cs-wsu by dillonmurphy10 and used with permission of the author. All other rights reserved by the author.

betoluna » CS WSU 2013-02-05 22:35:13

Hello again,

If you are using a mac and have problems running an HTML5/JS project using the HTTP preview localhost to test internally within eclipse 4.2 Juno, do the following:

1. Choose the web perspective.

2.Create a new Static Web Project.

3.Type your project name and click in the new runtime tab. That should bring another dialog

with a list of servers (HTTP Preview, HTTP server, J2EE preview). The problem I referred to in my previous post was with the HTTP preview, for which there is a fix for another version of eclipse namely Helios. If you want to be able to test within Juno, select the “J2EE preview” and click the “Create a new local server” box, then click on finish.

Continue setting up your project as usual, and you should be able to run and test your app from within eclipse now.

Hopefully this helps.

 

 

for another version of eclipse (Helios)

From the blog betoluna » CS WSU by betoluna1 and used with permission of the author. All other rights reserved by the author.