<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Marco Upia </title>
    <description>The latest articles on DEV Community by Marco Upia  (@casespring).</description>
    <link>https://dev.to/casespring</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1197303%2F810446f0-348e-4de2-9351-3aed0315584b.png</url>
      <title>DEV Community: Marco Upia </title>
      <link>https://dev.to/casespring</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/casespring"/>
    <language>en</language>
    <item>
      <title>Shifting to Flutter to build a social media app with no experience</title>
      <dc:creator>Marco Upia </dc:creator>
      <pubDate>Fri, 16 Feb 2024 07:20:29 +0000</pubDate>
      <link>https://dev.to/casespring/shifting-to-flutter-to-build-a-social-media-app-with-no-experience-33fk</link>
      <guid>https://dev.to/casespring/shifting-to-flutter-to-build-a-social-media-app-with-no-experience-33fk</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction:&lt;/strong&gt;&lt;br&gt;
Switching from Python and JavaScript to Dart and Flutter for my social media app was actually pretty fun and I learned a lot! There were a lot of challenges and stressful days but I'm glad I stuck with it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Embracing the Unknown:&lt;/strong&gt;&lt;br&gt;
When I started learning Dart's syntax and Flutter's widget-based architecture, I was a bit scared at first. Shifting from Python's easy-to-read code to Dart's strict typing system was a significant change for me. But then I realized that Dart's simplicity and Flutter's expressive UI framework could actually make my coding process a lot smoother.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Learning Curve:&lt;/strong&gt;&lt;br&gt;
I had to put in a lot of effort to learn Dart and Flutter. I spent hours reading documentation, asking chatGPT, and watching tutorial videos on YouTube. It was tough, but with time and practice, I got better at using Dart's features and Flutter's widgets. And can only improve with time&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Overcoming Challenges:&lt;/strong&gt;&lt;br&gt;
Managing state in Flutter's reactive framework was a difficult challenge for me. It took some time to wrap my head around concepts like setState(), Provider, and Bloc. But, with every obstacle I overcame, I gained a deeper understanding of Flutter's state management solutions, and how they help in building scalable applications. It really mostly like react and that helped a ton since I had experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Rewards of Adaptation:&lt;/strong&gt;&lt;br&gt;
Looking back at my journey, I realized that taking risks and trying new things has been super important for my growth. By challenging myself and doing things outside of my comfort zone, I've learned so much about modern app development and have gained a ton of new skills. These experiences have not only helped me successfully complete my social media app project, but also made me feel more confident and resilient as a programmer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br&gt;
In just three weeks, I totally transformed my programming skills from Python and JavaScript to Dart and Flutter. It was quite a journey, but I persevered, stayed curious, and was open to new experiences. And you know what? It opened up a whole new world of possibilities in app development for me! As I look ahead to new projects, I'm excited to continue learning and growing, and applying everything I've learned to innovate and explore in the ever-changing tech landscape.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>flutter</category>
    </item>
    <item>
      <title>Starting with Flask and SQLAlchemy: A Beginner's Guide</title>
      <dc:creator>Marco Upia </dc:creator>
      <pubDate>Sun, 11 Feb 2024 17:10:47 +0000</pubDate>
      <link>https://dev.to/casespring/starting-with-flask-and-sqlalchemy-a-beginners-guide-6la</link>
      <guid>https://dev.to/casespring/starting-with-flask-and-sqlalchemy-a-beginners-guide-6la</guid>
      <description>&lt;p&gt;Are you just getting started with Python and interested in creating web projects? Well, have I got the perfect solution for you! Let me introduce you to Flask and SQLAlchemy - a dynamic duo that makes web development in Python super easy, even for beginners like you!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flask: The Friendly Web Framework&lt;/strong&gt;&lt;br&gt;
Flask is a web application development framework that simplifies the process of creating web applications, much like a good friend who always has your back. It's a lightweight and easy-to-understand framework that follows the "micro-framework" principle. This means that it provides you with only the necessary tools to get started without overwhelming you with unnecessary features.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Setting Up Your Flask App&lt;/strong&gt;&lt;br&gt;
To create a Flask app, you need to install Flask first. To do this, open your terminal and type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install Flask
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let's build a simple "Hello, Flask!" app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from flask import Flask

app = Flask(__name__)

@app.route('/')
def hello_flask():
    return 'Hello, Flask!'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we've created a minimal Flask app. The @app.route('/') decorator tells Flask that when someone visits the root URL ('/'), it should execute the hello_flask function, which simply returns 'Hello, Flask!'.&lt;/p&gt;

&lt;p&gt;Run your app with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python your_app_name.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open your browser and navigate to &lt;a href="http://localhost:5000"&gt;http://localhost:5000&lt;/a&gt;. Congratulations! You have just created your first Flask app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SQLAlchemy: The Pythonic Database Toolkit&lt;/strong&gt;&lt;br&gt;
Let's discuss SQLAlchemy. If Flask is the buddy who assists you in constructing the framework, then SQLAlchemy is the expert who handles your database. It streamlines database interactions and provides a Pythonic interface, making it feel like you're working with Python, not intricate SQL queries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Setting Up Your Database&lt;/strong&gt;&lt;br&gt;
First, install SQLAlchemy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install Flask-SQLAlchemy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let's integrate SQLAlchemy into our Flask app. We'll use an SQLite database for starter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from flask import Flask
from flask_sqlalchemy import SQLAlchemy

app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///site.db'  # Using SQLite database
db = SQLAlchemy(app)

class User(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    username = db.Column(db.String(20), unique=True, nullable=False)

# Run this in your terminal to create the database
# python
# &amp;gt;&amp;gt;&amp;gt; from your_app_name import db
# &amp;gt;&amp;gt;&amp;gt; db.create_all()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, we've created a simple User model with an id and a username. SQLAlchemy helps us define our database structure using Python classes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connecting Flask and SQLAlchemy&lt;/strong&gt;&lt;br&gt;
Now, let's update our Flask app to use SQLAlchemy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from flask import Flask, render_template
from flask_sqlalchemy import SQLAlchemy

app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///site.db'
db = SQLAlchemy(app)

@app.route('/')
def home():
    users = User.query.all()
    return render_template('home.html', users=users)

if __name__ == '__main__':
    app.run(debug=True)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This Flask app uses SQLAlchemy to query all users from the database and passes them to a template (we'll create a simple 'home.html' file). The render_template function allows us to display dynamic content in our HTML.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Great job! You've taken your first steps into the world of Flask and SQLAlchemy. As you continue to explore, you'll discover the true potential of these tools in building dynamic and scalable web applications. Keep in mind that the best way to learn is by doing, so don't hesitate to experiment and work on your own projects.&lt;/p&gt;

</description>
      <category>python</category>
      <category>flask</category>
      <category>sqlalchemy</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Introduction to Object-Oriented Programming (OOP) in Python: Simplified</title>
      <dc:creator>Marco Upia </dc:creator>
      <pubDate>Sun, 04 Feb 2024 11:57:06 +0000</pubDate>
      <link>https://dev.to/casespring/introduction-to-object-oriented-programming-oop-in-python-simplified-4i20</link>
      <guid>https://dev.to/casespring/introduction-to-object-oriented-programming-oop-in-python-simplified-4i20</guid>
      <description>&lt;p&gt;If you're diving into the world of Python, you've probably come across the term "Object-Oriented Programming" or OOP. Don't let the fancy name intimidate you – it's just a way of organizing and structuring your code to make it more manageable and reusable. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So what are Objects in programming?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Objects are the basic building blocks of OOP in Python. An object is a package of functionality that does a specific job. It combines data (variables) and functions (methods) that operate on that data. &lt;/p&gt;

&lt;p&gt;To explain further, an object is like a bundle of tools that has all the necessary information to perform a particular task. For example, an object could be a calculator that adds or subtracts numbers. &lt;/p&gt;

&lt;p&gt;Overall, objects are essential to OOP in Python because they allow the programmer to create self-contained code with a clear purpose.&lt;/p&gt;

&lt;p&gt;Let's break it down with a real-world analogy: imagine you have a car. The car is your object. Now, this car has attributes like color, model, and speed (data), and it can perform actions like accelerating, braking, and honking (methods). In Python, we create objects to represent things and actions, making our code more organized and easier to understand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Classes: The Blueprint for Objects&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In Python, we use classes to create objects. A class is like a blueprint or a template for creating objects. Going back to our car analogy, if the car is an object, the class is the plan that defines how the car should look and what it should be able to do.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv450jytqw0qy3jt0yydb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv450jytqw0qy3jt0yydb.jpg" alt="Image description" width="800" height="634"&gt;&lt;/a&gt;&lt;br&gt;
Here, we defined a Car class with attributes (color and model) and methods (accelerate and brake). Then, we created an actual car object named my_car based on that class.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Encapsulation, Inheritance, and Polymorphism (Oh My!)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;OOP introduces three key concepts that make our code even more powerful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Encapsulation: It's like putting your code in a protective bubble. We group related data and methods in a class, and then we can hide the internal details. This helps prevent accidental interference and makes our code more modular.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inheritance: Imagine you have a super cool class, and you want to create a slightly modified version of it. Instead of starting from scratch, you can use inheritance. It allows a new class (the child) to inherit the attributes and methods of an existing class (the parent). It's like building on top of what you already have.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Polymorphism: This is a big word for a simple concept. It means that different objects can use the same method name, but they might do different things. It's like ordering coffee at different cafes – you ask for a "latte," and each place makes it a bit differently.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Bringing It All Together&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;OOP in Python is all about making your code more organized, reusable, and easier to understand. Classes and objects help you model real-world scenarios, and concepts like encapsulation, inheritance, and polymorphism add flexibility and efficiency to your code.&lt;/p&gt;

&lt;p&gt;As you continue your Python journey, don't be afraid to experiment with OOP. The more you play around with classes and objects, the more comfortable and powerful your code will become.&lt;/p&gt;

</description>
      <category>python</category>
      <category>oop</category>
      <category>programming</category>
      <category>objects</category>
    </item>
    <item>
      <title>Starting in React: What are props?</title>
      <dc:creator>Marco Upia </dc:creator>
      <pubDate>Mon, 11 Dec 2023 03:24:07 +0000</pubDate>
      <link>https://dev.to/casespring/starting-in-react-what-are-props-4c5o</link>
      <guid>https://dev.to/casespring/starting-in-react-what-are-props-4c5o</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction to React.js&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;React.js, a JavaScript library developed and maintained by Facebook since 2011, is a powerful tool for building single-page applications. One of its key features is Props, short for Properties, which plays a vital role in enhancing communication between different components within a React application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Power of Props&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Props are essentially a mechanism for passing data from one component to another. Components, the building blocks of React applications, can efficiently share information by utilizing props. What makes props particularly robust is their read-only nature, meaning that once data is passed to a component via props, it cannot be altered. This not only enhances security but also contributes to better performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reusable Data with Props&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Props empower developers to reuse data among different components, creating a modular and maintainable codebase. Typically, the component using the props value is the child of the component containing it. This hierarchical structure ensures effective data flow and facilitates the creation of more complex and dynamic applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Immutable Nature for Stability&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The read-only characteristic of props adds a layer of stability to the React application. Since props cannot be modified within the component, it minimizes unexpected changes and enhances predictability in the application's behavior. This immutability is particularly advantageous when dealing with data that should remain constant throughout the component's lifecycle.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Props vs. State: A Distinction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While props are excellent for passing and displaying unchanging data, React provides another mechanism called hooks for managing state. For dynamic data that requires regular updates, developers leverage hooks like the state hook. This clear distinction between props and state ensures that React developers can efficiently manage both static and dynamic aspects of their applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mastering Props for Effective Communication&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Although props are relatively simple to grasp, mastering them is essential for creating a dynamic React application with a stable and reusable codebase. The effective use of props allows developers to establish seamless communication between components, leading to a more modular and maintainable architecture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In conclusion, React Props serve as a fundamental building block for effective communication between components in a React application. Their read-only nature, combined with the ability to pass and reuse data, contributes to the creation of modular and stable code. While the basics of props are easy to learn, becoming proficient in their usage is a crucial skill for any React developer. By harnessing the power of props, developers can unlock the full potential of React and build applications that are both dynamic and maintainable.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>props</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Starting in Javascript: The DOM</title>
      <dc:creator>Marco Upia </dc:creator>
      <pubDate>Thu, 16 Nov 2023 17:15:33 +0000</pubDate>
      <link>https://dev.to/casespring/flatiron-blog-1-the-dom-4njn</link>
      <guid>https://dev.to/casespring/flatiron-blog-1-the-dom-4njn</guid>
      <description>&lt;p&gt;Hello everyone, &lt;/p&gt;

&lt;p&gt;My name is Marco Upia and I am an aspiring software engineer. Currently, I am enrolled in the Flatiron BootCamp course to pursue this career path. Although I had been wanting to switch to this field for a while, I finally mustered up the courage to take a deep dive into it and start the learning process. &lt;/p&gt;

&lt;p&gt;A bit of backstory before pursuing software engineering, I worked various odd part-time jobs. My most recent job was as a full-time manager at a popular Japanese restaurant where I learned valuable skills such as managing and operating an establishment. However, after reflecting on my career goals, I realized that software engineering is where my passion lies. This realization led me to enroll in this boot camp, and I am excited to see where this journey takes me.&lt;/p&gt;

&lt;p&gt;Now on to the main topic of this blog, The DOM! What is the DOM? Talking about this is more so for my understanding making sure I have a grasp of this particular concept of web development. The DOM is short for Document Object Model and it is a web API, I suppose I should also go over very quickly what an API is. I say very quickly because my understanding of an API is very recent and not too technical. An API stands for application programming interface it's a way for two programs or more to communicate with each other and the API is the middle-man. &lt;/p&gt;

&lt;p&gt;The DOM is an API and what does that mean, meaning the DOM is are middle-man. Now what does DOM help us communicate with, when it comes to web development nowadays it requires HTML, CSS, and Javascript to have interactive and responsive webpages, it's vital these three can communicate with each other. To do so the DOM would load the HTML into its Document structure to display it like a tree which allows us to manipulate it with Javascript and CSS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0xi0ymtyc6sng3rxe5fo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0xi0ymtyc6sng3rxe5fo.jpg" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
The DOM is a tree? What does it mean to display the contents of HTML into a tree, is that starting with the HTML tag as the top or in this case the root of a tree and every other HTML element branching out like a tree would. So in essence it would be an upsidedown tree structure (refer to the image). Now the HTML tags themselves have a different name and well most of the document model is structured like this called nodes. &lt;/p&gt;

&lt;p&gt;Nodes are everything from the whole page to the smallest element. The body, headers, paragraphs, and image elements to name a few are all nodes. Starting from the HTML considered the root Node and branching out into other Nodes having a parent-child relationship.&lt;/p&gt;

&lt;p&gt;Manipulation! Now that we have a sense of the DOM, Developers can interact with the DOM using programming languages like JavaScript. This allows them to access, modify, delete, or add elements and content dynamically. And by dynamically we mean the page doesn't have to reload and all the changes happen in front of the user in real-time. For example, changing the text of a paragraph or adding a new element to the page can be done using DOM manipulation.&lt;/p&gt;

&lt;p&gt;An understanding of the DOM is important for developers to make webpages interactive otherwise the end user would just see a plain webpage full of text with barely any user input. Think of it as a bridge between the structure of a web page and the programming code.&lt;/p&gt;

&lt;p&gt;This guide was simply to offer a beginner's introduction to the DOM. However, it's important to continue learning to fully grasp its concepts. Mastery of the DOM is essential for any developer.&lt;/p&gt;

&lt;p&gt;With that, I leave you till the next blog!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
