Tag Archives: week10

All about APIs

I had always heard this term “API,” and I think I knew just two things about it — it’s everywhere, and it’s powerful. After going through the readings and videos, I’m clearer on the actual technology, but still unsure of how I would use it in my site or in my reporting.

I’m also left with questions about security and ethics. In the WebConcepts video, the presenter said that in order to send a tweet through the Twitter API, you need to authenticate and get what’s called an “access token.” But I couldn’t see where he actually provided his login information in order to authenticate. I’m also wondering if this method circumvents any type of two-factor authentication.

I’m also wondering what companies get out of making all of this data public? This seems like a wealth of internal, constantly updating and valuable information that other companies can easily use to make their own products more valuable.

Conversely, having access to so much data and so much proprietary data is It’s also clearly a way to snuff out the competition. I read further about how Facebook has actually used access to their API to snuff out competitive companies by revoking their access. Revoking access to Facebook’s API means that whatever company is trying to use Facebook to create a user profile (these are the “Login with Facebook” or “Login with Google” buttons that allow you to basically autofill a profile with information you’ve already given to these two companies) is a real hindrance. Who wants to actually fill all that crap out?!

 

Learning about APIs

For this week’s readings, we went over application programming interface, or API. I like how the video used a waiter-kitchen analogy to go over what an API was. It seems to me that API is an integral part in processing interactions and requests online. This was something I had never heard about previously, so it was interesting to understand how interactions happen between computers and devices.

Representational state transfer was discussed in the second video, and they used social media examples like Twitter and Facebook as examples. When he started going over Facebook API requests, things took a turn for the more confusing. When he introduced parameters an an example, it made a little bit more sense — how he plugged in the parameters and ended up with coordinates.

I know that there are lots of different types of possible API requests available, but I think that how they interact and are directly used within my code is kind of the things that I am having a difficult time comprehending. For myself, I have noticed that once I understand how aspects of code relate and function with one another is when I can best understand and employ the types of code myself.

In the video when he started discussing authentication requests, it made me wonder if using API requests override normal access from one user to another, even on something such as WordPress because he mentioned Twitter posts from one account to another would be possible without the authentication.

To touch on the readings specifically, we read about JSON, or JavaScript Object Notation. I understand that JavaScript-looking objects will be returned from an API request, but I not exactly sure why this is, the benefit of it and what it looks like. Routes, end points, requests and responses seem very straightforward. However, schema and controller classes in terms of web development I need some further explanations to understand.

API, JSON

This week’s lesson into API and JSON took some digging to understand, but it was helpful to have analogies. Picturing an Application Programming Interface as a waiter in a restaurant that takes requests and tells a chef (or system) what the customer wants is interesting. I haven’t considered really how we use applications and devices to access databases and make requests, at least on the level of depth that I know now.

I am still working to understand both, but it’s definitely a lot less murky than before this week.

As for my final project, I’m still hashing out which three customizations I want to use, and I’m thinking ill just end up using all seven that I noted as possibilities in my updated post. I actually am also taking some of the photos for the galleries this week, and am excited to have the skeletons of everything placed on my website.

I still have to go back to I believe it was lesson / week seven (?) to relearn the shopping cart customization. My site is hopefully going to utilize both the PHP search option, short comment box and shopping cart as the primary user-interactive functionality.

I’ll also say that this class (and particularly this project) has gotten me more into the habit of checking the code behind websites I think are aesthetically pleasing, clean, user friendly and not too “busy.” I can bring a short list of possible customizations I’ve seen on other sites to class that I would want to explore whether they’d be doable for this project.

APIs, The Unsung Hero

Through this week’s reading, I have realized that APIs is an important part of my life because it allows interactions between applications, data and devices, giving us the connectivity that we love and deserve! To be honest, I was originally skimming through this week’s reading and I had a lot of trouble understanding APIs at first, causing me to be extremely frustrated.  As soon as I slowed down and gave the API readings a chance, I realized that “what is an API” is a question that people should be asking more often, especially with how imperative technology is in our world.

So what is an API?! This is a question I surely have been asking all night. I enjoyed watching the analogy in a video I watched this week that described an API as you requesting an order and the waiter acts as the communicator telling the kitchen your order and delivering the food back to you. I have noticed that many programmers have different definitions for what they believe an API is. Simply put, APIs make a lot of sense using the waiter analogy, but gets extremely complicated to me when I hear about there being unique APIs for Google and WordPress. In one of the articles, it says that the difference in a Google API is the format of the request and the response. Are most APIs typically very similar in format? I also noticed that the WordPress API also uses  JSON, but I am not sure if they are the same kind of API. I thought of the JSON version of an API as the waiter receiving an order from a foreigner, trying to make sense of it in the kitchen and then returning words in a new language. Not sure if this analogy makes sense, but hopefully there is one that would explain the format better to me.

I am still trying to make sense of APIs because it seems like it is a title some programmer just threw out there. Is an API something a programmer creates with the server? Although there are many questions out there, at least I know that APIs are our unsung hero!

Debating a change

During class this week, we discussed our midterm profiles We talked about Django, which is a high-level Python web framework, and how it operates. We learned how some people started learning how to code at age 57, so it is never too late to start.

We also discussed APIs, which stand for Application Programming Interface. It is the link that communicates the user’s request to the server and delivers back a response. APIs make connectivity between sites possible, especially in a complex set-up where many servers are connected to one user page. There are different kinds of APIs. I watched the video about the REST API, where it explained how we can type functions in the browser and an order will go out to the server and then a result will show up accordingly.

Figuring out FileZilla was interesting. I was not able to connect to it during class even after connecting to Saxanet. I contacted customer service and they said that my account is working and they are not sure what the problem is. After much frustration, I went home and tried it again on a different internet and it worked right away. I went through the instructions that Greg sent, but was not able to figure out what exactly to drag into the directory. I will work with Greg on Tuesday to make sure I have the right folders in the right places.

My final pitch is coming together. I want to create a consistent brand with the same colors, fonts, and design throughout all my platforms. This way there is an association between my name and that brand. I want my website to be easily navigable and all tabs are clear and straightforward.

I started my new job this week. We work with many departments to help them live stream events. We send them a toolkit to walk through the steps of setting up the live streaming, how they can manage it and what information they need to submit to our team. The tool kit is a Word document that we share and the manager was complaining about how inconvenient that has been. I was thinking we should create a website that we can add plugins to and we can have the steps for live streaming laid out, as well as various sections to upload the information our team needs. We can also add an FAQ section and a demo/examples section. I was debating changing my final project to this instead of a personal website. I will discuss this possibility with Greg tomorrow. 

API

The waiter analogy in the first tutorial set the meaning and function of APIs as clear as could be. I have always maintained that the use of everyday activities as references remain the most effective form teaching. Henceforth, that analogy will remain in my mind when I see the services of a waiter. I was so amazed about the power of the REST API and its possibilities. I will have to revisit most of the explanations at a later time to cement my understanding and its usage. But in all, the concept seem fairly simple and straight forward. I have been watching a few tutorials about the powerful symbiotic relationship between APIs and JSON. I was particularly impressed with this resource on REST API concepts and examples and how to make a API request (graph.facebook.com/youtube). I tried a couple of websites but got this error message.

{
   "error": {
      "message": "An access token is required to request this resource.",
      "type": "OAuthException",
      "code": 104,
      "fbtrace_id": "HuZcagOScRx"
   }
}

APIs & Agile

API Lite, Please

The first two readings this week helped solidify my understanding of what an API does: It’s the mechanism by which a client communicates with a server (like a waiter taking an order from a customer, retrieving it from the kitchen, and delivering it back to the customer).

The second two readings, on REST APIs, completely blew my mind.

In addition to taking and delivering data, APIs can also post them. Moreover, you can make API requests in a browser to view JSON data specific to your query, including specific parameters that you control. Then, you can take the data you mine from an API request on one website, and use it to access or reference additional data on another website! This waiter is multi-talented!

It does bring up a question for me about security, however. I know that access tokens must be passed to authenticate that the person accessing the data is allowed to access it, but do systems become vulnerable for malicious data scraping when their APIs are available on something like Apigee? This goes back to the recurring theme of developer tools being transparent and accessible—from web inspectors to API management software—while also being acutely aware of the risks of the internet.

Back to Agile Framework

Since Week 8’s discussion of agile frameworks, I’ve been paying more attention to how teams in my workplace function. I remembered that one of my colleagues, who works as a project manager for the marketing and technology teams, had regular “scrum” meetings on her calendar. I asked if those teams operated under an agile structure, and she (impressed by my question) responded that yes, our Chief Information Officer prefers to operate that way.

She explained they work within a framework that’s most similar to scrum, with sprints (a blend of technology and design work) lasting 10-15 days each. It’s interesting to think about this technology culture being nested within the framework of higher education, which operates on a much more drawn out and fluid timeline.

My colleague noted that, while projects aren’t always strictly within the set scrum framework, it’s been helpful for the members of the team to operate using a common language and set of expectations, and the framework has allowed them to complete a lot of high level projects with success.

She also mentioned that she uses the tool MS Project, which allows her to help the team visualize the consequences of contingencies and dependent tasks not being completed.

A Thoughtful Approach to Better Design

This weekend I began working and deciding upon the content I want to include in the final project, i.e. “It’s Susan’s Thing.” When building a website, I will have to keep in mind that the content (such as images, text and embedded materials) tells a story I want to present and the concepts I would like to share with my audience.

While tackling a project that I was never faced with before, in some way it becomes an educational experience. Therefore, in order to successfully complete this assignment, I will need to do research and educate myself so that I know what the best tools are and what languages might I have to revisit in order to create an effective website.

By learning the basics of web development in this course, I was easily tempted by the ease of finding ready-made pieces of code available online. However, by doing this, I would not be learning, but rather just manipulating code that essentially could be called cheating myself. This would also reduce the amount of effort I otherwise would put into gaining new knowledge. I don’t want to do that. I want to build a website based on my own inspirations and preferences. Every part of the design would be included there because I thought about it, and hopefully will meet my own level of expectations. Also, I won’t allow myself to be afraid to think outside the box and experiment with different techniques – achieving specific customizations sometimes requires courage 🙂

To conclude, I believe that building one’s own website from the very first line of code, forces to seek knowledge to achieve a given vision. You push yourself to research the required functions, which keeps you going forward, especially when searching for new ways and techniques to write and improve the code.

How Many Tweaks Until You Break a Child Theme?

Very slowly but surely, I am making progress on my site. I have decided to stick with my ‘nursing home’ theme and try to spruce it up a bit. Some of the things I plan on doing is downloading a few different fonts and try to incorporate them into the child theme’s code. Also I plan on going into the style sheet and manually changing the color code of certain traits of the site, like the side bar, menu bar text and site buttons. I have done some research and looked at some sample code for other sites that I was able to find online, and it seems easy enough for me to tackle. One thing I have learned is, anything that seems simple enough probably will be the exact opposite, but I will still try. The one thing I am afraid of is trying to do too much manipulation to the child theme and it break and then therefore so will my site. I have also been looking for some possible modifications to incorporate with my site. I haven’t committed to any of them just yet but I am leaning towards changing the sidebar and a possible ‘contact me’ plug in. I am not particularly sold on that plug in, so if anyone has any good plug in suggestions, please let me know. Also if you know any ways to tweak a child theme and not have it break, please let me know. Right now I feel like very unsure about tweaking it because I always get an error message in my code. Should I make my changes in the files that came with my child theme when I copied it (.html, .css, .etc) or should I create new pages and then replace the old ones? None of the sites I have read mention anything about it.

Piecing the Puzzle Together (Lists on Lists on Lists)

This week, I was challenged. I’m sitting down to put together a list of what needs to be done for my site, because I am lost without a to-do list. Every week, I feel like there is another step to the process that blindsides me and I don’t know where these steps fit into what I’m doing.

As I began the readings about API, it began to make sense. I think all of the readings make sense until I have to actually implement what I read into my work. I know that an API the part of the server that receives requests and sends responses. I know that it is what the user communicates with. The WordPress handbook  helped me to understand how it relates to my site. It could be used for front-end interactivity in WordPress.

The first thing on my to-do list is to create and incorporate my child theme into my regular theme. I’ve chosen Mesmerize for the theme. I need to do deeper research and reading into what exactly needs to be in my child theme. I know that the purpose of its creation is to be able to make changes in the theme without compromising the core of the WordPress theme. Next on my to-do list is to make a list of the code I need incorporated into that theme.

Overall, I think the biggest challenge for me is visualizing what needs to be done, followed by actually doing it.