Most notably, the website now consists of more than a redirect to a pdf. There is still much work to do with it, like the main page. All of the basic content required for the first week has been put in place, so the project description, resume, philosophy statement, and so on are accessible. The blog has its own space, though its current form will change as the database that will be behind the site is fixed (more on that later). A page has also been made for the circuit editor itself, this page will house the final product, so one will be able to see the changes to the editor over time. It is convenient to just deal with one location on my back end, so I will be using that same page for my own testing.
Behind the scenes, the website has been a bit of a nightmare thus far. Thinking I could just reuse code from my Programming Languages course from last semester, I spent an inordinate amount of time attempting to simply copy and change links and content, allowing me to reuse the CakePHP and Twitter Bootstrap frameworks along with my SQLite database. Unfortunately, the new location for the project is not configured the same as my own public html folder. As a result, two problems have become apparent. The new directory I’m working doesn’t seem to have the Options FollowSymLinks AllowOverride All flag set. This was a tremendous pain as CakePHP uses it for redirects. I was able to find a workaround for this, as evidenced by the site actually working at all. The second problem is going to require a bit more creativity. I really enjoyed using SQLite because it was so portable. I was just using an online editor to mess with things easily without needing extra software like MySQL Workbench. Unfortunately, it would seem as though permissions here are potentially causing problems as I have been unable to connect to the database, and I am very certain that it is configured correctly and that the site is looking in the correct location for it. The last time I worked with it, one of the major problems was forgetting to ensure that it allowed global read/write, which it has been set with now. I am a bit deadset on using a database for a few reasons. I want more experience with them, I want a convenient way of adding blogs, and I want a way of saving user data with an associated email, allowing easy access for the user (with the added benefit of preventing any side effects of users altering data files as so many in our class would do). While I would have preferred SQLite, we have access to MySQL, so my plans do not require too much modification. Speaking of plans…
So far I am pursuing the web based editor, as you may have guessed. I have found a number of resources which have given ideas for the creation of a grid for the workspace. Some of these have even had the ability to drag and drop things across them. One example was based on my exact project, and allowed moving circuit parts that snapped to intersections in the grid. This was something I was hoping to shoot for, but was unsure how to pull it off. That example was simply moving pictures around without any underlying logic, so I still would have a lot of work to do pursuing that idea. I also have a decent idea of what I want for an interface, and a mockup will soon be on my site. I have also developed a better understanding of what I may need for my data. As I had noted in the previous entry, there are a number of considerations to be made with this.
I am sure that these requirements will change as I develop the concepts. I already know that saving circuits could potentially require additional information, like the relative position of components. This is also showing some assumptions I have had when working on this. I think I would be determining position based on “parent positions”. This is where the algorithm for finding the beginning of circuits would be especially useful. This raises a number of problems though. How would different branches coming together work? I do not yet have a solution for this. For a tree, this is all really simple, as the components would be able to inherit information like position and state from their parent, but that clearly doesn’t work immediately since all of the logic gates have two inputs and one output by definition. The reverse wouldn’t work either as nothing prohibits multiple wires stemming from one component. This problem is one of the largest I foresee.
Progress has been made outside of the logic. I have two potential solutions to the icons for the gates, png-24 images, or using a webdings-like font that displays the circuit components. I have found a font that would work for that, however I am not sure about whether components will be rotatable yet. If so, that could potentially present an extra obstacle, and another piece of data to track.
My immediate goals are fixing the database problem, and getting a functional workspace grid, and then building from there. From there, the interface could be made, then functionality could be added piece by piece.