Tag Archives: PHP

Final project pitch post

Goals: For my final project I plan to build a recipe site with rotating pictures, cooking instructions, and a Q&A section for recipe requests. Based on our in-class discussion, I think I will use a WordPress theme for the design, layout, fonts, colors, etc.

I envision the layout of the site being relatively simple and clutter free. Given that this isn’t really a ‘personal site’ I don’t feel the need to have a homepage introducing myself, why I made the site, etc. Instead I would like the main page to get right into the heart of the content – food. I will have header tabs that break up the recipes by “breakfast” “lunch” and “dinner,” but the homepage will house the most recent recipes posted to the site. I will then have a fourth tab that allows for house the “Request a Recipe!” portion of the site.

Audience: This site would be intended for anyone that enjoys cooking and is searching for new, fun recipes. I have always enjoyed cooking and, although I don’t claim to be an expert, I have a ton of good recipes that family and friends are always asking for. I think this site will be a fun project for me and something I would be proud to share and continue working on once our class is finished.

Planned Modifications:

1. A customized slideshow for each recipe (jQuery plugin)

2. A customized “Request a Recipe!” section where visitors can submit questions or requested recipes that are emailed directly to my account and then I can either choose to respond, post the recipe, etc. (PHP plugin)

3. I will also use HTML and CSS to build out the cooking instructions, ingredients, tips and tricks, etc. although I think a lot of this will be done directly in the WordPress site. I would be curious to hear your feedback (Greg or fellow classmates) on whether there are certain HTML/CSS designs I should consider outside of WordPress, or if it’s best to add plugins that focus more on jQuery and PHP.

URL: victoriakinnealey.com

Creating a Poll out of PHP – So Close But Still So Far

For this week’s readings, going through the articles definitely helped clear up some questions I had regarding WordPress, and I am excited to use some of the tools we read about — i.e. custom post types and meta boxes — to create my personal site and have included them as modification options in my final pitch.

For this week’s PHP exercise, I used the W3School’s tutorial on how to make a poll to try and create a basic poll for my homepage. The tutorial talked about AJAX — Asynchronous JavaScript and XML — and was a little more advanced then what we’ve covered so far in the Codecademy lessons and in class. However, I really wanted to try this example because I would like to, if possible, create a poll for the blog I want to build for my final project. I want to create a book review blog and have people vote on the next book I should read, and I tried to make a basic example of this this week.

However, I wasn’t completely successful. I was able to modify the HTML and most of the PHP correctly and got the poll to display and be clickable. The major hurdle I’ve come across is that I cannot get the site to accurately show the updated results of the poll on the page after the click, the way the tutorial intends. I think the issue lies somewhere in the way my PHP file is interacting with the text file I am using to store my poll data, but, to be honest, I’m not entirely sure where I’m going wrong. I will keep working on the code to see if I can get the outcome to show up the way it’s supposed to before class on Wednesday.

In terms of creating a poll for my final project, I am still really interested in the idea and have found a plug-in I think I may be able to use that will help make the process easier, since other tutorials I looked at for creating polls seemed to suggest you need to create a database and I think that may be too challenging, especially after my struggle this week.

GitHub link: https://github.com/tatyanaberdan/phpassignment

PHP, MAMP- Better, But Still Not 100%

Just as I feel like I finally understand something, it seems to all break down. Last week I felt like I was completely understanding PHP, and to be honest, I feel like I still do. Unfortunately, I am having trouble with it hooking up with my MAMP server. However, if that is my only struggle, and I am not almost in tears like I was with JavaScript, then that’s alright with me. It might have been because I wasn’t in class when we went over this, or that I am reading the instructions wrong, but I for some reason cannot find where it says “phpmyadmin” to create a new database. I am continuing to work on it, but am getting a little frustrated. But, like I said, I think I am fully understanding PHP and have been able to create a folder under htdocs, so hopefully I will eventually get it running sometime in the near future.

As far as this week goes, I am really enjoying PHP and have taken some of the additional courses on Codecademy in my spare time. I don’t understand it as well as HTML, or CSS, but it’s coming along.

For the readings, I found them very helpful this week. I am still a little bit confused about the child and parent themes in WordPress, but am hoping this is something that we will attend to in class next week.

Overall, I am pleased to be feeling this way. During the time when we were working JavaScript and the slideshow, I thought I might have to drop the class because I couldn’t understand. Now, I am feeling a little bit more confident in my skills and knowledge of the material. I am really looking forward to the final project and creating my own personal portfolio.

Word Press and PHP Drama

This week I spent most of my time re-reading through the WordPress readings and thinking about what I should be doing for my final project. Because I hope to be able to build on what I create for the final project, I want to make sure that this is something I can keep up with and that the theme I choose has enough flexibility to fit different types of content (i.e. recipes, reviews, about me, etc.). What I was able to come up with you can find in my updated Final Pitch post, but to give you a synopsis, I want to create a website that is focused on food, but also gives my audience/readers a glimpse into my life and who I am. I want to feature things about myself, what I’m interested in and what I’m doing in hopes to be able to connect with others like me.

What I took away from the readings was the complexity of WordPress. It is not as straightforward or easy as it seems. There are levels of complexity that are giving me a little anxiety knowing we have to navigate WordPress to create the site. On the other hand, as stated in my last post, being able to use a platform like WordPress also gives us a safety net to rely on, which I really appreciate.

For my PHP code assignment, I added a comment box where site visitors could input their name, email address, and comment. I explain in my code, that the comments will all be replied to individually and thus the email address is needed. I want to be able to incorporate this into my final project as a customization. I also want to be able to incorporate liking the content because I think user engagement is most important. That being said, the PHP code assignment was not as easy as I thought it would be. While this might be my favorite code-type we’ve learned thus far, in practice, PHP can be difficult. At first, I was having trouble echoing the different boxes I had created. I Googled my way through it, but I’m hoping to be able to learn it on my own in the future.

Questions:

  • For the next class, will be going through how to create the repository for our final project in GitHub?
  • Will you walk us through how to install WordPress on our hosting service (like GoDaddy)?

The WebMD of Web Development

This exercise was not as terrible as I thought it would be. For the first time in seven weeks I can say thank you to Codecademy for leaving me with a boat as I did the homework. As always there was a necessary assist from W3Schools, the paddle, but I was not completely in the dark this week.

That being said, I have to thank W3Schools for explaining how to connect my PHP file to the HTML page. I looked back at my notes, and reflected on our class, and realized that the explanation from Greg was the only one we had to go on.

Now there was some confusion, which showed up when I sent my repository. Every now and then Googling the answers feels like looking to WebMD for a health diagnosis and falling down a rabbit hole. Since Codecademy gave no instructions, I looked to W3Schools. They helped me get some of the code but showed several different ways of connecting and referencing the PHP and getting it to do things. Naturally, I chose one that did not do what I thought it did. This explanation, among the four others available, seemed to make the most sense though. Well now it’s been fixed and the code does what it should.

I am definitely happy to be moving on to editing code instead of writing it from scratch. I am narrowing down the themes and am ready to adjust the child theme to be what I need it to be. I’m also excited to see my dad’s reaction, hopefully a happy one, when the site is done. I am not excited for the many more bottomless pits that Google and W3Schools will be dropping me in. Yes, trial and error are all part of it, but doctors tell patients to avoid WebMD, we seem to be doing the opposite.

Oh well. C’est la vie.

PHP…Easier Said Than Done

For our PHP Codecademy assignment this week (though I accidentally completed it early!), I was pleasantly surprised as to how simple moving through the different modules were. Greg pointed out in class that it definitely could be our growing knowledge of various coding languages, which I certainly hope is right, but I also think that this particular Codecademy assignment was also a lot less buggy than jQuery, so I could have just been feeling the pains from completing those projects in a timely manner.

Though the assignment on Codecademy was simple, I found that incorporating it into our website page was very difficult. First, I wasn’t even sure what kind of PHP I would be able to add in a simple manner onto my page (should I try to code something to show up on the page? Or just add back-end elements that wouldn’t be seen on the client side?). After Googling I was able to piece together a very rough contact form, but the syntax for coding this also proved difficult. It might have been easier had I done the Codecademy assignment closer to the date the project was due, but I felt more in the dark about starting this assignment than I had in other previous ones. Perhaps this can be discussed more in class.

Final Project: I have decided that I’d really like to add on to my current website and make it a portfolio/profile page about myself for potential future employers. I’m excited to dive back into HTML and CSS (languages that feel a lot more comfortable to me) to build out the bones of the page, and then do some digging about what additional elements I can include with PHP, jQuery, and more to make my page more robust and custom. Looking forward to seeing everyone else’s projects as well!

PHP as compared to jQuery

When completing this week’s assignment, I have to say I was constantly waiting for the tough PHP lessons to role around and, to my pleasant surprise, all four Codecademy sessions were pretty straightforward and easy to complete. Similar to something I mentioned in some of my JavaScript/jQuery lessons, the concepts and logic behind PHP coding made sense to me. If you have the term “array” and then list several objects, items, numbers, etc. that list makes up the array – logical. Similarly, an “if” “else” statement is pretty direct. Depending on the first variable, the computer should execute the code behind “if,” otherwise do “else”. What I liked even more about PHP as compared to JavaScript/jQuery is that the actual execution of the code is also relatively simple (thus far). I think the loop content was especially easy to execute as compared to jQuery coding. It has clear variables linked to clear actions (e.g. the first in line is the starting point, second in line is the end point, and third in line is how much you should add or subtract each time to move from start to end).

I think the one piece of PHP I hope to gain a better understanding of is how, exactly, it differs from jQuery and in what instances we should use one as opposed to the other. I understand that PHP is meant for the server, whereas jQuery works with the web browser, but I am still unsure when we should use each in our coding. Is one preferable for a larger piece of code? Is it a matter of the coder’s preference to use once versus another? What are the pros and cons to each if they, ultimately, achieve the same task just in different languages? I think this will become clearer as the class goes on, but at the moment that is my biggest outstanding question as relates to PHP.

I am also pretty excited to start work on our final assignment! Originally I wasn’t sure what type of website I would want to build, which made the task feel daunting and uninspiring as building a website just for the sake of it seems like a lot of work. Once I thought of a recipe blog, however, I realized that is something I would enjoy updating, maintaining, and potentially sharing with others one day, which makes the project much more fun.

PHP Lessons and Introduction to WordPress

I found this week’s Codecademy lessons on PHP to be much easier than the previous lessons on jQuery and JavaScript. I was able to move through the lessons without too much trouble. I’m still wondering what the exact purpose and advantages are of using PHP (other than users not being able to see all of your HTML code because it is being run on the server instead of in the browser), but perhaps this is something we will address in class this coming week. I found Greg’s lecture on PHP and his step-by-step tutorial for setting up a local server on our laptops to be very helpful, as I am typically able to comprehend things better when I have the opportunity to directly and immediately apply the steps and skills being taught.

The introductory lecture about WordPress also urged me to think in greater detail about what I’d like to work on for my final project site. As I detailed in my brief pitch post, I’d like to use this as an opportunity to create a blog about the topic of running, which will serve as a sort of digital/online accountability partner on my quest to run a full marathon in 2018. I’ve been having some trouble getting the motivation to run consistently over the last few weeks, and I’m hoping that having this site as a place to document my training and progress will motivate me to get back on track.

I went ahead and did a few of the readings that are now listed on the syllabus for next week, and I found these to be very useful in terms of helping me to decide how I want to structure my final project site. The reading about creating plugins was interesting because I think I’d like to attempt to create a plugin that links between my Strava profile and shows my most recent run. I did a little bit of research and found that at least one Strava plugin for WordPress already exists, but I’m hoping to either create my own or to customize an existing plugin in some way. Further customizations to my site might also include creating a child theme, which will enable me to alter some aspects of my site’s theme. I’m a bit confused about when it is appropriate to create a parent theme versus a child theme. WordPress indicates that if I want to make extensive customizations, then I should consider creating a parent theme, but I’m not exactly sure what is considered to be extensive. Is there a clear explanation for when it is appropriate to create a parent theme versus a child theme?

Overall, I’m looking forward to learning more about the features that WordPress offers and seeing how I can apply them to my final project site.

PHP and WordPress Intro

Compared to the past couple of weeks — having to navigate JavaScript and JQuery — this week’s Codecademy lessons on PHP were actually fairly simple and easy to understand. Besides the foundation I could draw on from our previous work, I think what really helped was that I was very conscious this week about spacing out the work and coding a little each day. I know several of my classmates have been experiencing issues with Codecademy being finicky in these lessons, and I ran into a similar issue for the first time this week when the site took too long to read the for loop I created. I couldn’t figure out what was wrong with the program and eventually had to reset the code and refresh the page several times for it to finally work.

Overall, I think the one thing I’m still really struggling to understand with PHP is its function: how it fits in with the other languages we’ve learned and  how all of these come together to form a website. I understand the idea that PHP is read by the server and HTML, CSS, and JavaScript by the browser, and I understand the functions of the last three and some of the functions of the first. However, I’m struggling to see the big picture and exactly how we’ll be utilizing all of these in our final project. Hopefully, as we delve more into WordPress and our individual sites, this will become clearer.

This week, I also started delving into the WordPress readings, as suggested, and the reading on themes really helped clarify some of my lingering questions from last class — like what exactly the difference is between a theme and a plug-in. I hope to finish most of these readings before Wednesday.

For the final project, I submitted a pitch for creating a personal site. I am looking forward to this week’s closer look at WordPress so I can get a better understanding of what I want. Right now I’m worried my ideas for what to create and how to modify my site will either come out too ambitious or not ambitious enough.

I might love PHP

This week was a very pleasant change of course. PHP is awesome! I really enjoyed the Codecademy lessons, and I’m excited to implement my final project.

I never thought I would care about back-end development. But this week proved me wrong.

Overall, PHP on Codecademy was much more digestible than JavaScript. I felt like I was able to understand all the concepts, which usually doesn’t happen in the lessons we have.

I’ve said before that I thought I’d like front-end development more, I’ve found that PHP really explains the “why” of what’s going on. I thought front-end stuff would be easier to pick up, but PHP was clear and concise.

This class has been hard. I’ve grown a lot in the last couple of weeks and I cannot explain how nice it felt to understand what was happening. I feel like I was carrying a boulder up a mountain and finally was able to stop and see the view.

I’m looking forward to what we have coming up in the next few weeks. While JavaScript was challenging, and the slide show gave me a panic, this is a much nicer process.

God bless PHP. And God bless America.