Connect with us

SEO

Dynamic Website: The Ultimate Guide

Published

on

Dynamic Website: The Ultimate Guide


There are various kinds of websites out there: from e-commerce websites, calendar websites, to-do websites, to purely informational ones that you don’t really get to interact with. We access these websites every day. Thing is, you can split these websites in two camps: dynamic and static websites. In this blog post, I’m discussing what a dynamic website is, how to build one, and when you should.

  1. What is a dynamic website?
  2. What is the easiest way to build a dynamic website?
  3. When should you build a dynamic website?
  4. Key takeaway

What is a dynamic website?

According to Amelia, “a dynamic website… can display different content and provide user interaction, by making use of advanced programming and databases in addition to HTML.” Basically, dynamic websites (or database-driven sites) can take more time and effort versus static websites because they are more interactive, functional, and flexible (plus dynamic websites usually have a lot of pages).

Some people say that dynamic websites need more coding, but it really depends on you. Some prefer to build websites from scratch, others prefer using software to make the job a whole lot easier.

Examples of dynamic websites

If you’re wondering if you have ever seen a dynamic website—you have. Take Twitter for example:

Twitter SEO Hacker

What you see on Twitter gets changed based on your activity. Our recommendations, homepage, and trends won’t be the same. Other social media and forum platforms like Quora, Reddit, Instagram, and Facebook are the same way.

But social media is far from being the only example of dynamic websites, and you are more familiar with them than you think. Check out the SEO Hacker website:

SEO Hacker dynamic website

It’s interactive and it regularly gets updated with content. You can even get a free website analysis, and the results will show up on the page itself.

As you can see, blogs and e-commerce sites, to-do sites, streaming sites, and any other website that regularly changes up its content are called dynamic websites.

Differences between static and dynamic websites

Now, there are some who say that some websites that are usually categorized as dynamic (such as blogs) are static websites. When a website is static, it displays content that is similar to everyone, across users. In this case, I would argue that it depends. Most blogs I know are dynamic, as we can arrange content by date and categories, and we can even comment on the posts. So, if your website is mostly informational and users can’t really interact with them, then they’re static.

And for another quick comparison—you kind of need to understand HTML and coding when creating a static website. There are static website generators out there that can provide you with a framework, but there is still coding involved.

Some examples of static websites are documentation sites and company information sites.

What is the easiest way to build a dynamic website?

Perhaps the easiest way to build a dynamic website is to use a CMS or a content management system like WordPress. When you use a CMS, you can create and interact with website content without having to change the code.

If you want to build a dynamic website but:

  1. You aren’t a professional developer or you simply don’t feel confident in your coding skills;
  2. You want to focus on content creation over website development;
  3. You know your website will have a lot of pages; or
  4. You simply don’t have the time to code because there are other things you need to focus on like running the business you’re building your website for;

I recommend using a CMS.

For example, when I write a blog post here on SEO Hacker, I don’t have to code its contents—I just use the editor and format the post there.

Edit WordPress Post

WordPress also has themes you can choose and install so that you can easily style what your website looks like.

And WordPress isn’t the only CMS out there you can use, by the way. There’s also Joomla, Squarespace, Drupal, and other kinds to pick and choose from.

When should you build a dynamic website?

At first, I was thinking that I should add here a list of pros and cons, then I realized that it isn’t really a question of why you should pick a dynamic website over a static website, but when.

It’s important to remember that the kind of website you’re choosing to build has a purpose. If it’s purely informational and it isn’t going to be updated much, you pick a static website.

But if…

Your website has frequent information updates

Let’s say you’re running a blog that gets updated regularly. It would be more convenient to create a dynamic website (again, through a CMS) because updating would be a breeze.

Look at the photo I shared earlier of the draft of this blog post. The editor looks like a plain document editor. Underneath all that is the code, but if I don’t need to edit anything in the code (such as adding rel=“nofollow” to the external links), then I don’t even really need to tinker with it.

To hammer the point further, the SEO Hacker blog has 191 pages. There are roughly five posts per page, so there are around a whopping 950+ blog posts here, give or take.

Imagine if I have to code every single one of them.

Multiple people are contributing to the website

Let’s say you have a team handling your business website. By creating a dynamic website, your team members can create, manage, and update content in your website without having to figure out how to program. They can simply access the editor, put the content there, and upload it.

Let’s take a look at the HubSpot blog as an example:

HubSpot Blog dynamic website

As you can see, there are multiple authors—meaning, multiple contributors. Dynamic websites make this easier as, again, the contributors can just access the editor, add, and publish their content there.

You make use of various functionalities

In dynamic websites, you can install what we call “plugins” really easily. You literally just pick and choose. Whether you need contact forms, Disqus, redirections, spam protections, and other functionalities, you can check your CMS or you can upload your own using a .zip file.

WordPress Plugins

You want leads to engage with your website

Lastly, dynamic websites are incredible for user engagement. The content is interactive and is built for, well, engagement.

Your leads can input their data in your forms, they can search for products, they can leave comments, and you can provide them constantly with new information.

Let’s take a look at my other website, Leadership Stack:

Leadership Stack dynamic website

If you’re doing any sort of sales or content marketing, engagement and easy updating is what you want. In that case, a dynamic website is your best friend. Your leads get to read your blog posts, listen to your podcast, watch your videos, check out your merch, and subscribe to your channel (or channels) in one website.

Key takeaway

There are various reasons as to why you should build a dynamic website as I have discussed in this post. And the only question left really is: Is it what you need?

If you know you want your website to be more than just an informational one that you are most likely to set and forget, then a dynamic website is for you. If you want engagement from your potential leads and customers, then a dynamic website is for you. If you know that you will be constantly updating your website with new information and at some point, you want a whole team to be dedicated to managing the contents of your website, then a dynamic website is for you.

Let me know if this explainer was helpful for you!





Source link

Continue Reading
Comments

SEO

Making Python Scripts Work In Browser For Web App Creation

Published

on

Making Python Scripts Work In Browser For Web App Creation


Making Python Scripts work in a web browser involves handling web app functions inside a web page via Python Programming Language.

Since JavaScript is the main programming language for making a web browser work, and a web page interactive, Python is usually used for data science, machine learning, and artificial intelligence.

Even if we have back-end infrastructures like Django, and Flask, or static-site-generators like Jekyll, Python is usually behind JavaScript for web development.

But thanks to the latest improvements, JavaScript’s future is open to discussion. “PyScript” allows Python Scripts to work easily within web components.

According to PyScript.net:

“PyScript is a framework that allows users to create rich Python applications in the browser using HTML’s interface and the power of PyodideWASM, and modern web technologies. The PyScript framework provides users at every experience level with access to an expressive, easy-to-learn programming language with countless applications.

In this column, you’ll learn what PyScript is, see an example, learn about alternatives, and also find how to create a custom web app with Python and PyScript.

What Is The JavaScript To Python Migration?

Python is a human-readable programming language.

Thus, there are many Python intermediary program languages to help JavaScript and Java modules and packages are being used in the Python environment.

For example, “TensorFlow” is mainly a JS Package, or Plotly and Selenium.

There are even special packages to make JavaScript code turn into Python code, such as Js2Py.

Why is understanding JavaScript behind Python important?

Because using Python Scripts inside the web browser doesn’t mean that the age of JavaScript is ending for web development.

JavaScript is still functioning behind the Python Scripts in the web browser.

What Is PyScript & How Can You Use It For Creating Web Applications?

PyScript is a framework for making web browsers use Python Scripts.

PyScript turns Python code blocks into Javascript equivalents behind the scenes.

To use PyScript inside a web browser, follow these steps.

Use the stylesheet and JavaScript in the <head> area of the HTML File.

<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />

<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
  • Use the Python Code inside the “<pyscript></pyscript>” web component.
  • Pay attention to the indentation.
  • Do not format the Python code inside the “<pyscript/>” web component.
  • Use the shortcuts and arguments of the PyScript for importing Python modules and packages.
  • Use the CSS Classes and IDs to insert the results into the HTML Documents’ specific Div.

An Example Of Running Python Script Inside Of Web Browser

An example of running a Python script in the browser is below.

<html>
<head>
     <link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
     <script defer src="https://pyscript.net/alpha/pyscript.js"></script>
     <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
          crossorigin="anonymous">
     <py-env>
- numpy
- matplotlib
     </py-env>
</head>

The <head> area of the HTML File represents the most important resources.

We used the “pyscript.css” and “pyscript.js.”

We also used the “<py-env/>” web component to make the Python modules to be imported.

In this example, we have imported the “numpy” and “matplotlib.”

In the “<body>” section, we will use these modules to create a Python Line Plot inside a web browser.

<body>
     <h1>Let's plot random numbers</h1>
     <div id="plot"></div>
     <py-script output="plot">

At the beginning of the <body>, we used a “div” with the “plot” ID.

It is necessary for making the Python script’s output insertion.

The “<py-script output=”plot”>” is necessary to match the specific HTML Div’s ID value.

 import matplotlib.pyplot as plt

 import numpy as np
 
 x = np.random.randn(1000)

 y = np.random.randn(1000)

 fig, ax = plt.subplots()
 ax.scatter(x, y)
 fig
     </py-script>
</body>
</html>

The Python Script above is a simple line plot script. And you can see the result below.

Screenshot by author, June 2022

The example above shows how to create a line plot with the help of PyScript.

How To See The Terminal Output Of The PyScript

For every Python Script, there is always a terminal that works and outputs the messages from the computation process.

Pyscript ConsoleScreenshot by author, June 2022

The browser console should be read and followed by the developer to see how the PyScript works and what happens behind the scenes.

For example, the screenshot above shows the running process of the Python script that we have created.

It explains how the “numpy”, or “matplotlib” and their dependencies are loaded, and used by which resource.

How To Create a Custom Web App With Python And PyScript?

To create a custom Web App with Python and PyScript, follow these steps:

  • Import the necessary JS and CSS files from PyScript.
  • Create an HTML Document with proper HTML Tag syntax.
  • Use the “py-script” HTML tag with the “output” attribute.
  • Use an HTML Div with a specific ID to match the “output” attribute value.
  • Use “py-env” for the non-built-in libraries of Python.
  • Insert Python Script inside the “py-script” tag without syntax and indentation error.
  • Use “return” in a Python function, or “print” to end your script.
  • Refresh the web page to see the results.

An example of a Custom Python Web App for “random password generation” based on the given password length is below.

Python Web App CreationScreenshot by author, June 2022

The screenshot above demonstrates an example of PyScript in an HTML Document to generate custom passwords.

The Python script that I used is below.

import string
import random
characters = list(string.ascii_letters + string.digits + "!@#$%^&*()")
def generate_random_password():
    length = int(input("Enter password length: "))
    random.shuffle(characters)
    password = []
    for i in range(length):
        password.append(random.choice(characters))
    random.shuffle(password)
    print("".join(password))
generate_random_password()

And, the live version of the custom Python Web App is here.

Just write a numeric value into the input area.

Input AreaScreenshot by author, June 2022

And, it will give you a simple 45-character password.

SEJ Custom Python AppScreenshot by author, June 2022

You can use this technology for some of my other SEJ Articles for auditing sitemaps, or visualization of hot topics from news websites.

Or, in the future, we can demonstrate more sophisticated web apps via PyScript.

What Are The Disadvantages Of PyScript?

The main disadvantage of PyScript is the lack of support.

PyScript is announced during Pycon 2022 to Python developers.

It was a big and exciting event, but community expectations were higher than the current state of PyScript.

Due to weak community support, PyScript development might be slower in the future, but when we think of the journey of Python, it is not surprising.

Python wasn’t that popular until the last five years, because it wasn’t known.

Python Search TrendsScreenshot by author, June 2022

Above, you can see how Python suppressed the search demand of JavaScript overall.

The main reason for Python’s popularity growth is the “pandas” library.

That’s why, ML and Data Science are the main focuses of Python, but it doesn’t have to continue in that way.

Thus, PyScript should be taken into serious consideration for the future of web development.

Pyscript Search DemandScreenshot by author, June 2022

What Are The Alternatives To PyScript?

Alternatives to PyScript are not equivalent to PyScript since it directly runs on the browser, but still, there are different methods to use Python scripts inside a website indirectly.

These included “brython”, “pyodide”, “Appwrite”, “django-readers”, “appdeamon”.

Some alternatives to PyScript are for Firebase such as Appwrite, and some other work for Web Development such as Brython.

Bryhthon for Web App Creation

Brython is older than Pyscript, and it focuses on making Python the primary language for web development with “text/python” file type instead of “text/javascript”.

Can PyScript And Brython Affect Search Engines And SEO?

Yes, in the future, PyScript and Brython can increase their effect on the web development industry.

Changing web development technologies and industries affect search engine crawlers and protocols.

If a search engine starts to see “text/python” files, or “.py” scripts in the HTML source code, it should be able to make it work to see the web page as is.

At the moment, PyScript works via JavaScript, and Brython is already at the beginning of its journey despite its being older.

Other PyScript alternatives work via Node.js like back-end programming libraries, or Firebase like cloud-based systems.

Thus, in the future, Google, as a heavily Python-coded search engine, might need to render Python files for crawling and rendering web pages.

Conclusion For Python As Web Scripting

For people who love coding, it doesn’t matter whether you use Python or JavaScript for a certain task.

But, Python is the easiest programming language to learn as human-readable, it gives more functionality with fewer characters.

Most data scientists and ML (machine learning) Engineers know Python in a good way, and transferring their talents into web development would be similar to the unification of two different universes.

More resources:


Featured Image: TippaPatt/Shutterstock





Source link

Continue Reading

SEO

Does Google Crawl URLs In Structured Data?

Published

on

Does Google Crawl URLs In Structured Data?


Google’s John Mueller answered whether Google would use links in structured data for crawling. Getting links discovered, crawled, and then indexed is vital to SEO, so any available advantage for getting more pages crawled would be helpful.

What Does Google Use Links For In Structured Data?

The person asking the question wants to know if Google uses links discovered in structured data for crawling.

They also want to know if Google doesn’t use the links for crawling if they’re just stored.

Here is the question:

“Does Google crawl URLs located in structured data markup or does Google just store the data?”

Google Tries Crawling Many Kinds Of URLs

Mueller’s answer might seem a little surprising because, among other things, he mentions that Google might try to crawl a link that’s in a text file.

Another point of interest is that he says Google will crawl anything that “looks” like a link, followed up with examples of what “looks like a link” means.

Mueller’s answer:

“So for the most part, when we look at HTML pages, if we see something that looks like a link, we might go off and kind of like try that URL out as well.

That’s something where if we find a URL in JavaScript, we can try to pick that up and try to use it.

If we find a link in kind of a text file on a site, we can try to crawl that and use it.”

Mueller’s answer is a pretty good overview of what Google might do with alternative links, links that are not traditional HTML hyperlinks with anchor text.

What followed is Mueller’s reminder that all of these alternative forms of links should not be viewed as substitutes for actual HTML hyperlinks, what Mueller calls a “normal link.”

Mueller strongly recommends using a standard HTML hyperlink if you want something that performs like a link.

He continued his answer:

“But it’s not really a normal link.

So it’s something where I would recommend if you want Google to go off and crawl that URL, make sure that there’s a natural HTML link to that URL, with a clear anchor text as well, that you give some information about the destination page.

If you don’t want Google to crawl that specific URL, then maybe block it with robots.txt or on that page use a rel=canonical pointing to your preferred version, anything like that.

So those are kind of the directions I would go there.

I would not blindly assume that just because it’s in structured data it will not be found.

Nor would I blindly assume that just because it’s in structured data it will be found.

It might be found.

It might not be found.

I would instead focus on what you want to have happen there.

If you want to have it seen as a link, then make it a link.

If you don’t want to have it crawled or indexed, then block crawling or indexing.

That’s all totally up to you.”

Alternative Links

SEOs have created many alternative forms of links, some of which (like “link mentions”) have no basis in reality and are pure conjecture and opinion.

Many years ago, SEOs began practicing something called Google Stacking, which included adding links to Google Sheets and then pointing links to that Google sheet believing that the practice would help rankings.

The idea was similar to Web 2.0 link building, where some SEOs had the mistaken notion that so-called “authority” from a Google-affiliated site would trickle over through the links on Google Sheets and Google Sites.

Adding this to Mueller’s answer about links in structured data, Mueller confirmed that Google might crawl links in structured data, JavaScript and text files. But he also said that regarding structured data, Google might not crawl those links.

Mueller affirms that it’s best to use actual links if you want the power of links.


Citation

Watch John Mueller answer the question at the 23:20 minute mark.

Featured Image: YouTube.com/GoogleSearchCentral, June 2022. 





Source link

Continue Reading

SEO

The Four Day Work Week

Published

on

The Four Day Work Week


Thinking about implementing a four-day work week? It’s easier than you think.

In this episode, Joe O’Connor of 4DayWeek.com joined me to discuss implementing a four-day week and why CEOs and HR managers should consider trying it. We also discussed the global momentum around the shift in thinking amongst companies.

Offering flexible working or remote working used to be a competitive advantage. It’s not anymore. It’s now a standard expectation.–Joe O’Connor, 13:53

And part of the beauty around this is the quid pro quo. You know, it is the idea that this is for many leaders that have done this. They’ve described it as the cheapest, most efficient process improvement strategy we have ever deployed.–Joe O’Connor, 34:44

We’re going to be trying the four-day work week, and we’re going to be sharing how it’s worked for us. Just like we’ve been sharing things like being a digital-first company that has always been a virtual workplace.–Loren Baker, 40:32

[00:00] – A little about Joe and the four-day workweek.
[04:01] – Is a 3-day weekend a great incentivizing force?
[06:15] – Does it level the playing ground with gender equality?
[13:10] – Why is the four-day work week suddenly taking off?
[17:00] – How does it differ amongst countries?
[21:35] – Recommended tools for outdated ways of working.
[25:21] – How do you make the most of someone’s natural productivity.
[26:40] – Misconceptions about shutting down the company on a Friday or a Monday.
[31:53] – Learn from a study from a company that moved to a four-day work week.

People said their output, expectations, and responsibilities are the same as before we took reduced work time. And they’re the same as our five-day colleagues. So what does that tell us? It tells us two things. First, we’ve got a gender equality problem in the workplace. Secondly, Parkinson’s Law is the idea that the length of time that you’ve got available to complete a task that a task will expand to fill the time available for its completion. And that’s something that drives the philosophy behind the four-day workweek movement.–Joe O’Connor, 05:20

It seemed like the first one, and last one out was that indicator of who was working the hardest, and not necessarily the indicator of who was working the smartest.–Loren Baker, 15:15

People’s priorities have changed. For many people, the pandemic has forced them to realign how they value different things within their lives and what they think constitutes a reasonable life-work balance.–Joe O’Connor, 20:12

Resources mentioned:
https://www.4dayweek.com/

For more content like this, subscribe to our YouTube channel: https://www.youtube.com/user/searchenginejournal

Connect with Joe O’Connor:

Joe O’Connor is a driven and dynamic campaigner with extensive leadership experience in campaign work and organizational transitions. His passion lies with social justice issues that pertain to economic empowerment for all people globally – he’s 4 Day Week Global CEO!

Right now, Joe is leading 4 Day Week Global’s pilot program, with 150 companies launching six-month coordinated trials of the four-day week in the first half of 2022 alone. These trials involve 7,000 employees from the United States, Canada, United Kingdom, Ireland, Australia, and New Zealand.

​​Connect with Joe on LinkedIn: https://www.linkedin.com/in/joe-o-connor-81704287/
Follow him on Twitter: https://twitter.com/joeoc99

Connect with Loren Baker, Founder of Search Engine Journal:

Follow him on Twitter: https://www.twitter.com/lorenbaker
Connect with him on LinkedIn: https://www.linkedin.com/in/lorenbaker





Source link

Continue Reading

Trending

Copyright © 2021 Liveseo.com