DEV Community

Cover image for Introduction: Stop Learning Frameworks. Start Understanding Engineering.
Muhammad Hassan Obaid
Muhammad Hassan Obaid

Posted on

Introduction: Stop Learning Frameworks. Start Understanding Engineering.

Beyond Frameworks: 10 Fundamental Software Engineering Concepts Every Developer Should Understand

From Laravel and React to Rails, MERN, Django, and Beyond

Audience: Junior to Mid-Level Software Engineers (0–3 Years of Experience)

Reading time: Approximately 20–25 minutes


Imagine you join a company as a software engineer.

Your team uses Laravel, React, and PostgreSQL. You have spent the last two years working with Ruby on Rails, React, and MongoDB.

Your first thought might be:

"I don't know their framework. How will I work with this codebase?"

But consider something.

Regardless of whether a company uses Laravel, Rails, Django, Spring Boot, Express, or another framework, it still needs to solve similar engineering problems:

  • How should a user interface be rendered?
  • How should frontend and backend communicate?
  • How should application data be managed?
  • How should reusable components be designed?
  • How should users be authenticated?
  • How should application routes be handled?
  • How should data be transferred securely?
  • How should code be prepared for production?

Frameworks provide different implementations of these solutions.

The underlying engineering concepts, however, are largely transferable.

A framework-independent software engineer understands the problem first and the framework's implementation second.

In this article, we'll explore ten fundamental concepts using real-world analogies and production-oriented examples.

We'll use one application throughout our discussion: an Employee Task Management System.

Employees can log in, submit daily tasks, add subtasks, record durations, and view reports. Managers can review their team's activities.

This will help us connect individual concepts to an actual software system.


1. Frontend Rendering: How Does Data Become an Interface?

Let's begin with a fundamental question:

When a user opens a website, how does information become something visible on their screen?

Imagine our employee management application has the following employee records:

[
  {
    "id": 1,
    "name": "Ali",
    "department": "Engineering"
  },
  {
    "id": 2,
    "name": "Ahmed",
    "department": "Marketing"
  }
]
Enter fullscreen mode Exit fullscreen mode

The user doesn't want to see raw JSON.

They want to see an employee dashboard containing names, departments, buttons, and other interface elements.

The process of transforming data and UI instructions into a browser-visible interface is called rendering.

Real-world analogy: Restaurant

Imagine visiting a restaurant.

You don't receive raw ingredients. You receive a prepared meal.

Similarly, a browser needs a rendered interface rather than just application data.

Three important rendering approaches

A. Server-Side Rendering (SSR)

The server generates HTML and sends it to the browser.

The process:

  1. Browser requests /employees.
  2. Backend retrieves employees from the database.
  3. Backend generates HTML.
  4. Browser receives the HTML.
  5. Browser displays the page.

Laravel example:

Route::get('/employees', function () {
    $employees = Employee::all();

    return view('employees.index', [
        'employees' => $employees
    ]);
});
Enter fullscreen mode Exit fullscreen mode

Blade:

@foreach ($employees as $employee)
    <h2>{{ $employee->name }}</h2>
    <p>{{ $employee->department }}</p>
@endforeach
Enter fullscreen mode Exit fullscreen mode

B. Client-Side Rendering (CSR)

The browser executes JavaScript and constructs the interface.

React example:

function Employees() {
    const [employees, setEmployees] = useState([]);

    useEffect(() => {
        fetch('/api/employees')
            .then(response => response.json())
            .then(setEmployees);
    }, []);

    return (
        <div>
            {employees.map(employee => (
                <div key={employee.id}>
                    <h2>{employee.name}</h2>
                    <p>{employee.department}</p>
                </div>
            ))}
        </div>
    );
}
Enter fullscreen mode Exit fullscreen mode

C. Hybrid Rendering

An application can combine server rendering and browser-side rendering.

For example, a product page may initially be rendered on the server, while shopping cart interactions happen in the browser.

Production engineering example

Consider a public employee directory and a private management dashboard.

You might choose:

  • Server rendering for pages where initial HTML and discoverability matter.
  • Client-side rendering for highly interactive dashboard sections.
  • A hybrid approach when both initial rendering and rich interaction are important.

The correct decision depends on performance, SEO, infrastructure, complexity, and user experience.

What to internalize:

Rendering is not specific to Laravel or React. It is a fundamental web engineering concept.

You should understand where rendering happens, what data is required, and what trade-offs each approach introduces.

Suggested illustration: A side-by-side comparison of SSR, CSR, and hybrid rendering, showing the browser, server, JavaScript execution, and HTML generation.


2. Templating Engines: How Do We Generate Dynamic HTML?

Suppose a company has 5,000 employees.

Would you manually create an HTML page for every employee?

Of course not.

You create one template and insert employee information dynamically.

That's the purpose of a templating engine.

Real-world analogy: School certificates

A school has one certificate design.

It contains placeholders for:

  • Student name
  • Registration number
  • Grade
  • Date

The same design can generate thousands of certificates.

Templating engines work similarly.

Important subconcepts

1. Variable interpolation

Inserting dynamic values into a template.

<h1>Welcome, {{ $user->name }}</h1>
Enter fullscreen mode Exit fullscreen mode

2. Iteration

Rendering multiple records.

@foreach ($employees as $employee)
    <p>{{ $employee->name }}</p>
@endforeach
Enter fullscreen mode Exit fullscreen mode

3. Conditional rendering

Displaying content based on a condition.

@if($employee->is_active)
    <span>Active</span>
@else
    <span>Inactive</span>
@endif
Enter fullscreen mode Exit fullscreen mode

4. Reusability

Using reusable components and partial templates rather than duplicating HTML.

5. Escaping

Ensuring untrusted text is displayed safely instead of being interpreted as executable HTML.

For example, Blade's escaped output syntax:

{{ $user->name }}
Enter fullscreen mode Exit fullscreen mode

is preferable to raw output when displaying untrusted user input.

Same concepts across frameworks

Concept Laravel Rails React
Templates Blade ERB JSX
Interpolation Blade expressions ERB expressions JavaScript expressions
Iteration @foreach each map
Conditions @if if Conditional expressions
Reusable UI Blade components Partials Components

Production example

Imagine building an employee management dashboard.

Instead of writing employee markup repeatedly:

function EmployeeCard({ employee }) {
    return (
        <article>
            <h3>{employee.name}</h3>
            <p>{employee.department}</p>
            <span>{employee.status}</span>
        </article>
    );
}
Enter fullscreen mode Exit fullscreen mode

Now the same component can be reused wherever employee information needs to be displayed.

What to internalize:

Separate data from presentation.

Understand interpolation, iteration, conditional rendering, escaping, layouts, and reusable UI.


3. Client–Server Architecture: How Do Different Parts of an Application Communicate?

Now imagine an employee clicks the Submit Task button.

What happens?

The frontend cannot simply save data into the backend database by itself.

It needs to communicate with the server.

This is where client-server architecture becomes important.

Real-world analogy: Restaurant ordering

  1. Customer selects a meal.
  2. Waiter receives the order.
  3. Kitchen processes the order.
  4. Restaurant records the transaction.
  5. Prepared food is delivered to the customer.

In a web application:

  • Customer = User
  • Waiter = HTTP request
  • Kitchen = Backend
  • Restaurant records = Database
  • Prepared food = HTTP response

Understanding the request-response lifecycle

User clicks Submit
        |
        v
Frontend creates HTTP request
        |
        v
Backend receives request
        |
        v
Routing matches endpoint
        |
        v
Middleware executes
        |
        v
Controller processes request
        |
        v
Business logic executes
        |
        v
Database operation
        |
        v
Backend creates response
        |
        v
Frontend receives response
        |
        v
UI updates
Enter fullscreen mode Exit fullscreen mode

Important subconcepts

  • Client: Browser, mobile application, or another consumer.
  • Server: Application that receives and processes requests.
  • HTTP request: Message sent by the client.
  • HTTP response: Message returned by the server.
  • HTTP methods: GET, POST, PUT, PATCH, DELETE.
  • Headers: Metadata accompanying requests and responses.
  • Status codes: Indicate the outcome of a request.
  • Serialization: Converting application data into a transferable format.
  • Separation of concerns: Dividing responsibilities between application layers.

Production-grade example

Suppose an employee submits a task.

Request:

POST /api/tasks
Content-Type: application/json
Enter fullscreen mode Exit fullscreen mode

Payload:

{
  "task_name": "Fix mobile input issue",
  "duration_minutes": 120
}
Enter fullscreen mode Exit fullscreen mode

Laravel endpoint:

Route::post('/tasks', [
    TaskController::class,
    'store'
]);
Enter fullscreen mode Exit fullscreen mode

Controller:

public function store(Request $request)
{
    $validated = $request->validate([
        'task_name' => 'required|string|max:255',
        'duration_minutes' => 'required|integer|min:1'
    ]);

    $task = UserTask::create([
        'user_id' => auth()->id(),
        'task_name' => $validated['task_name'],
        'duration_minutes' =>
            $validated['duration_minutes']
    ]);

    return response()->json([
        'message' => 'Task created successfully',
        'data' => $task
    ], 201);
}
Enter fullscreen mode Exit fullscreen mode

Notice the responsibilities:

  • Frontend collects information.
  • Backend validates the request.
  • Backend determines the authenticated user.
  • Backend persists the data.
  • Backend returns a response.

The frontend should not be responsible for enforcing critical business rules.

Important HTTP status codes

Code Meaning Example
200 OK Task retrieved
201 Created Task successfully created
400 Bad Request Invalid request structure
401 Unauthorized User not authenticated
403 Forbidden User lacks permission
404 Not Found Task doesn't exist
422 Unprocessable Content Validation failure
500 Internal Server Error Unexpected server failure

What to internalize:

You should be able to trace a request from the browser to the database and back without depending on a particular framework.

Suggested illustration: Browser → Router → Middleware → Controller → Service → Database → Response → Browser.


4. Component-Based Architecture: How Do We Organize Complex Interfaces?

Imagine a large employee dashboard.

It contains:

  • Header
  • Sidebar
  • Employee profile
  • Task list
  • Subtask form
  • Duration inputs
  • Reports
  • Notifications

Putting everything into one enormous component makes the application difficult to maintain.

Instead, divide the interface into smaller, reusable units.

This is component-based architecture.

Real-world analogy: Building construction

A building consists of different units:

  • Rooms
  • Doors
  • Windows
  • Electrical systems
  • Plumbing systems

Each has a responsibility.

Similarly, a software interface consists of smaller UI components.

Important subconcepts

1. Component

A reusable UI building block.

2. Composition

Combining smaller components into larger interfaces.

3. Props

Information passed into a component.

4. Local state

Information managed within a component.

5. Events

Interactions that trigger actions.

6. Lifecycle

Different stages of a component's existence.

7. Separation of concerns

Giving components clear responsibilities.

React example

function TaskCard({ task }) {
    return (
        <div className="task-card">
            <h3>{task.title}</h3>

            <p>{task.description}</p>

            <SubtaskList
                subtasks={task.subtasks}
            />
        </div>
    );
}
Enter fullscreen mode Exit fullscreen mode

The parent component supplies the task through props.

Production example

A task management dashboard might have this structure:

EmployeeDashboard
│
├── DashboardHeader
├── DateSelector
├── TaskList
│   ├── TaskCard
│   │   ├── TaskTitle
│   │   ├── Duration
│   │   └── SubtaskList
│   └── TaskCard
├── DailySummary
└── SubmitButton
Enter fullscreen mode Exit fullscreen mode

A good component design makes it easier to:

  • Reuse functionality.
  • Test individual components.
  • Change one section without unnecessarily affecting others.
  • Maintain large interfaces.
  • Delegate development across a team.

However, not everything should become a separate component. Excessive fragmentation can make an application harder to understand.

What to internalize:

Understand component boundaries, composition, props, state, event communication, and maintainability.

Suggested illustration: A hierarchical employee dashboard showing parent components, child components, props flowing downward, and events flowing upward.


5. State Management: How Does an Application Remember Information?

Imagine an employee is entering a task.

Initially:

task = {
    name: "",
    duration: 0
};
Enter fullscreen mode Exit fullscreen mode

The employee enters:

task = {
    name: "Fix mobile input issue",
    duration: 120
};
Enter fullscreen mode Exit fullscreen mode

The application's data has changed.

The interface needs to reflect the latest information.

This changing application information is called state.

Real-world analogy: A restaurant order

A waiter maintains your order.

Initially, your order is empty.

You add a burger.

Then you add a drink.

Then you cancel the drink.

The waiter maintains the latest order.

That is similar to state management.

Important subconcepts

Subconcept Explanation
State Current application data
State transition Change from one state to another
Events Actions that cause state changes
Local state State owned by a component
Global state State shared across components
Derived state Data calculated from other state
Persistent state Data that survives reloads
Server state Data owned by the backend
Synchronization Keeping different representations consistent

React example

function Counter() {
    const [count, setCount] = useState(0);

    function increment() {
        setCount(previous => previous + 1);
    }

    return (
        <button onClick={increment}>
            Count: {count}
        </button>
    );
}
Enter fullscreen mode Exit fullscreen mode

Production example: Shopping cart

Imagine:

  • Product page adds products.
  • Navbar displays cart quantity.
  • Cart page displays selected products.
  • Checkout calculates totals.

These components may need access to shared cart state.

You can use Redux Toolkit, Context, or another suitable state management solution.

But an important distinction exists.

Frontend state is not the same as database state.

Suppose a customer adds a product to their cart.

If the cart only exists in browser memory, refreshing the page may reset it.

If it is persisted in the backend database, it can survive browser restarts and be available across devices.

Also, never trust the frontend to determine critical values such as:

  • Product prices.
  • Inventory availability.
  • Payment amounts.
  • User permissions.

The backend must validate and calculate these independently.

What to internalize:

Understand where data belongs, who owns it, how it changes, how it is shared, and whether it needs to survive a page reload.


6. Frontend–Backend Integration: How Do Different Layers Work Together?

Consider an application with:

  • Laravel backend.
  • React frontend.

Both need to communicate.

One approach is to maintain separate frontend and backend applications and communicate through REST APIs.

Another approach is to use an integration solution such as Inertia.

Understanding separate frontend/backend architecture

React Application
    |
    | HTTP / JSON API
    |
Laravel Application
    |
    v
Database
Enter fullscreen mode Exit fullscreen mode

The React application manages its UI, while Laravel manages business logic, authentication, and data access.

This architecture is perfectly valid.

However, it requires deliberate integration of:

  • Routing.
  • Authentication.
  • API communication.
  • Data serialization.
  • Error handling.
  • Deployment.
  • Repository coordination.

What is Inertia?

Inertia provides a bridge between server-side frameworks and modern frontend frameworks.

For example, Laravel can handle routing and controllers while React handles the interface.

Laravel:

public function show(string $id)
{
    $user = User::findOrFail($id);

    return Inertia::render('Users/Show', [
        'user' => [
            'id' => $user->id,
            'name' => $user->name,
            'email' => $user->email
        ]
    ]);
}
Enter fullscreen mode Exit fullscreen mode

React:

export default function Show({ user }) {
    return (
        <div>
            <h1>{user.name}</h1>
            <p>{user.email}</p>
        </div>
    );
}
Enter fullscreen mode Exit fullscreen mode

Important subconcepts

1. Data transfer

Moving information between frontend and backend.

2. Serialization

Converting backend objects into transferable data.

3. Data hydration

Supplying the frontend with the data it needs to render.

4. Props

Inputs supplied to frontend components.

5. Authentication integration

Coordinating authenticated identity across the application.

6. Error handling

Communicating validation failures and unexpected errors.

Production engineering consideration

Avoid blindly passing complete database models to the frontend.

An employee record might contain:

  • Name.
  • Email.
  • Salary.
  • Password hash.
  • Internal notes.
  • Role.

The frontend might only need the employee's name and department.

Use explicit data structures or API resources to control what gets exposed.

What to internalize:

Understand how information travels across application boundaries, how it is transformed, and how security is maintained.

Suggested illustration: Two architecture diagrams, one showing separate React and Laravel repositories connected through REST APIs, and the other showing Laravel + Inertia + React in one repository.


7. Routing Architecture: How Does an Application Decide What to Display?

Imagine a user opens:

/employees
/employees/10
/tasks
/reports
Enter fullscreen mode Exit fullscreen mode

How does the application know which page or functionality should handle each URL?

This is routing.

Real-world analogy: Hospital departments

A hospital has:

  • Reception.
  • Emergency department.
  • Laboratory.
  • Pharmacy.

Each department handles different requests.

Routing similarly directs incoming requests to the correct application handler.

Two important routing approaches

A. Server-side routing

The backend receives a URL and selects the appropriate controller/action.

Laravel:

Route::get(
    '/employees',
    [EmployeeController::class, 'index']
);
Enter fullscreen mode Exit fullscreen mode

Rails:

get '/employees', to: 'employees#index'
Enter fullscreen mode Exit fullscreen mode

Express:

app.get('/employees', employeeController.index);
Enter fullscreen mode Exit fullscreen mode

B. Client-side routing

A frontend JavaScript application handles navigation and determines which component to display.

React Router:

<Routes>
    <Route
        path="/employees"
        element={<Employees />}
    />

    <Route
        path="/reports"
        element={<Reports />}
    />
</Routes>
Enter fullscreen mode Exit fullscreen mode

Important subconcepts

  • Route matching.
  • Route parameters.
  • Query parameters.
  • Nested routes.
  • Protected routes.
  • Route middleware.
  • HTTP methods.
  • Fallback routes.
  • 404 handling.

Production example

Consider a MERN food ordering application.

Frontend routes:

/                  → Home
/restaurants       → Restaurant List
/restaurants/:id   → Restaurant Details
/cart              → Shopping Cart
/orders            → Orders
/profile           → User Profile
Enter fullscreen mode Exit fullscreen mode

Backend API routes:

GET    /api/restaurants
GET    /api/restaurants/:id
POST   /api/orders
GET    /api/orders/my-orders
Enter fullscreen mode Exit fullscreen mode

These routes serve different purposes.

An important security rule:

Hiding an admin page in React does not protect admin API endpoints.

The backend must independently enforce authorization.

What to internalize:

Understand how URLs map to application behavior and why routing, authentication, and authorization are separate concerns.


8. Authentication and Authorization: Who Are You, and What Can You Do?

Suppose an employee logs into the task management application.

The system must identify the employee and determine what actions they can perform.

These are two different problems.

Authentication

Authentication answers:

Who are you?

Example:

An employee enters an email and password.

The server verifies the credentials and establishes an authenticated identity.

Authorization

Authorization answers:

What are you allowed to do?

For example:

Role Permission
Admin Manage all employees
Manager View team reports
Employee Submit personal tasks

Real-world analogy

Consider an office building.

  • Employee ID card identifies you.
  • Access permissions determine which rooms you can enter.
  • Security checks whether you're authorized.

Identification is authentication.

Permission checking is authorization.

Important subconcepts

  1. Identity.
  2. Credentials.
  3. Password hashing.
  4. Login and logout.
  5. Sessions.
  6. Cookies.
  7. Access tokens.
  8. Authentication middleware.
  9. Roles and permissions.
  10. Access control.
  11. CSRF protection.
  12. Session expiration and revocation.

Laravel example

Route::middleware('auth')->group(function () {
    Route::get('/dashboard', function () {
        return view('dashboard');
    });
});
Enter fullscreen mode Exit fullscreen mode

Production-grade authorization example

Imagine an employee tries to access another employee's task.

A dangerous implementation might only check whether the user is logged in.

A safer implementation checks resource ownership or permission:

public function show(UserTask $task)
{
    $this->authorize('view', $task);

    return response()->json($task);
}
Enter fullscreen mode Exit fullscreen mode

The authorization policy must enforce the appropriate ownership or role rules.

Important security considerations

  • Never store plaintext passwords.
  • Use secure password hashing.
  • Protect session cookies.
  • Use HTTPS.
  • Configure CSRF protection where applicable.
  • Enforce permissions on the backend.
  • Never trust frontend role information.
  • Handle session expiration.
  • Revoke compromised or invalidated credentials appropriately.

What to internalize:

You should be able to explain the complete login lifecycle and distinguish authentication from authorization.


9. SSR and Hydration: How Does a Server-Rendered Page Become Interactive?

Imagine a user opens an online store.

The server sends a page containing:

<h1>Laptop</h1>
<p>Price: 150,000 PKR</p>

<button>Add to Cart</button>
Enter fullscreen mode Exit fullscreen mode

The browser can display this HTML.

But how does the button become interactive?

This is where hydration becomes important.

Understanding SSR

The server generates the initial HTML before sending it to the browser.

This can improve initial content availability and help search engines discover page content.

Understanding hydration

Hydration is the process of attaching client-side JavaScript behavior to HTML that has already been rendered on the server.

For example:

Initially:

<button>Add to Cart</button>
Enter fullscreen mode Exit fullscreen mode

After hydration, JavaScript attaches the click handler.

Now the button can respond to user interactions.

Important distinction

Concept Responsibility
SSR Generate HTML on the server
CSR Generate or update UI in the browser
Hydration Attach client-side behavior to server-rendered HTML
SSG Generate static HTML ahead of user requests

Production example

Consider an e-commerce application.

You might use:

  • SSR for public product pages.
  • Client-side interactions for shopping cart updates.
  • Backend APIs for checkout and payment processing.

But SSR also introduces additional considerations:

  • Server rendering must be efficient.
  • Browser-only APIs cannot run indiscriminately on the server.
  • Initial server and client output should be consistent.
  • Hydration mismatches must be investigated.
  • The SSR runtime needs appropriate deployment and monitoring.

What to internalize:

Understand why SSR exists, what hydration does, and how rendering strategy affects performance, SEO, and operational complexity.


10. Asset Bundling and Build Systems: How Does Development Code Become Production Code?

During development, a frontend application might contain hundreds of JavaScript, CSS, and component files.

Browsers need assets that can be loaded and executed appropriately.

This is where build tools and bundlers come into the picture.

Real-world analogy: Courier distribution center

Imagine thousands of packages arriving at a distribution center.

The company organizes, sorts, and prepares them for transportation.

A bundler similarly processes frontend files and dependencies into production-ready assets.

What is Vite?

Vite is a frontend development and build tool.

It provides:

  • Development server.
  • Hot Module Replacement.
  • Dependency processing.
  • Production builds.
  • Asset optimization.

Important subconcepts

Concept Explanation
Bundling Processing and combining modules
Transpilation Converting source syntax into compatible output
Minification Removing unnecessary characters
Tree shaking Removing unused exports where possible
Code splitting Dividing application code into chunks
Asset hashing Fingerprinting filenames
HMR Updating modules during development
Dependency management Managing external packages
Production build Preparing deployable assets

Example

Development:

npm install
npm run dev
Enter fullscreen mode Exit fullscreen mode

Production:

npm run build
Enter fullscreen mode Exit fullscreen mode

During development, Vite provides a fast development environment.

During production, it generates optimized assets for deployment.

Production scenario

Your React application works perfectly on your laptop.

You deploy it, but users see:

  • Missing CSS.
  • JavaScript loading errors.
  • Broken asset paths.
  • Blank pages.
  • Incorrect API URLs.

Possible causes include:

  • Incorrect environment variables.
  • Incorrect build configuration.
  • Missing generated assets.
  • Incorrect deployment paths.
  • Incorrect server routing.
  • Runtime configuration problems.

A software engineer should understand the difference between development and production environments and know how to investigate these failures.

What to internalize:

You should understand what happens between writing frontend code and deploying it to real users.

Suggested illustration: Source code → Dependency processing → Bundling → Optimization → Build output → Hosting/CDN → Browser.


11. Connecting Everything: Build a Production-Oriented Application

So far, we have studied ten concepts individually.

Now let's connect them.

Consider our Employee Task Management System.

An employee logs in, submits tasks, adds subtasks, records durations, and views daily reports.

A simplified architecture could look like this:

                  BROWSER
                     |
                     v
              FRONTEND UI
                     |
         Components / State / Routing
                     |
                     v
              HTTP REQUEST
                     |
                     v
                BACKEND
                     |
              Authentication
                     |
               Authorization
                     |
                 Routing
                     |
                Controller
                     |
             Business Logic
                     |
               Validation
                     |
                     v
                 DATABASE
                     |
                     v
                RESPONSE
                     |
                     v
             FRONTEND UPDATE
Enter fullscreen mode Exit fullscreen mode

Production-grade example: Submit a task with subtasks

Request:

{
  "task_name": "Improve login functionality",
  "activities": [
    {
      "description": "Implement login UI",
      "duration_minutes": 60
    },
    {
      "description": "Implement backend authentication",
      "duration_minutes": 120
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

A reliable backend should:

  1. Authenticate the employee.
  2. Verify permission to submit the task.
  3. Validate the task and nested activities.
  4. Create the parent task.
  5. Create the associated activities.
  6. Calculate the total duration on the backend.
  7. Save everything inside a database transaction.
  8. Return the updated task.
  9. Let the frontend update the interface.

Laravel service example

class CreateTaskService
{
    public function execute(
        User $user,
        array $data
    ): UserTask {

        return DB::transaction(function () use ($user, $data) {

            $task = UserTask::create([
                'user_id' => $user->id,
                'task_name' => $data['task_name'],
            ]);

            foreach ($data['activities'] as $activity) {
                $task->activities()->create([
                    'description' => $activity['description'],
                    'duration_minutes' =>
                        $activity['duration_minutes'],
                ]);
            }

            $totalMinutes = $task->activities()
                ->sum('duration_minutes');

            $task->update([
                'hours' => intdiv($totalMinutes, 60),
                'mins' => $totalMinutes % 60,
            ]);

            return $task->load('activities');
        });
    }
}
Enter fullscreen mode Exit fullscreen mode

This is an illustrative service implementation. In a production application, the request validation, authorization, model constraints, and service contract should be defined separately.

What engineering principles are demonstrated?

  • Separation of concerns.
  • Component-based architecture.
  • State management.
  • Client-server communication.
  • Authentication and authorization.
  • Data validation.
  • Database transactions.
  • Backend ownership of business rules.
  • Data persistence.
  • Error handling.

The most important lesson is that these concepts work together.

Knowing how to write a React component is useful.

Knowing how that component communicates with a secure backend, handles state, survives failures, and displays persisted data is software engineering.


12. Framework Independence: Recognize the Same Concepts Everywhere

One of the best ways to become framework-independent is to map the same engineering concept across different technologies.

General engineering concept Laravel Ruby on Rails MERN
Routing Laravel Routes Rails Routes Express / React Router
Controller Controller Controller Express Controller
Templating Blade ERB JSX
Components Blade / Livewire ViewComponents / Hotwire React Components
State management Livewire state Stimulus / frontend state React / Redux
Rendering Blade / Inertia SSR ERB / SSR Next.js SSR
API communication HTTP / JSON HTTP / JSON Fetch / Axios
Authentication Laravel Auth Devise / Rails Auth Passport / Auth0 / custom
Authorization Policies / Gates Pundit / CanCanCan Authorization middleware
Asset building Vite Propshaft / jsbundling Vite / Webpack
ORM Eloquent Active Record Mongoose / Prisma
Background jobs Queues Active Job BullMQ

The implementations differ, but the underlying engineering problems are familiar.

Learn the concept once. Learn each framework's implementation when needed.


13. What Should a Software Engineer with 2 YOE Actually Understand?

Let's distinguish between memorizing syntax and developing engineering competency.

Area Expected understanding
Rendering Explain SSR, CSR, and hybrid approaches
Templating Build dynamic and reusable views
Client-server Trace an entire HTTP request lifecycle
Components Design clear component boundaries
State Decide where state belongs and how it changes
Integration Understand APIs, props, serialization, and hydration
Routing Design server and client routes
Authentication Explain sessions, cookies, and tokens
Authorization Enforce role and resource permissions
SSR Understand rendering and hydration trade-offs
Build systems Understand development and production builds
Architecture Compare alternative approaches and justify decisions
Security Recognize common web application vulnerabilities
Debugging Trace failures across frontend, backend, database, and deployment

You don't need to memorize every framework's internal implementation after two years.

But you should be able to explain the engineering decisions behind your code.

For example:

Instead of saying:

"I used Redux because that's what I learned in React."

You should be able to say:

"I used centralized state because multiple independent components need access to the same cart information. I considered local state and Context as alternatives, but selected Redux because the application's shared state and update patterns justified the additional structure."

That is a much stronger engineering explanation.


14. A Practical Framework for Learning Any New Engineering Concept

Whenever you encounter a new concept in documentation, use this six-question method.

The Six-Question Engineering Method

1. What is it?

Understand its definition.

2. Why does it exist?

Identify the engineering problem it solves.

3. How does it work internally?

Understand the execution mechanism.

4. What alternatives exist?

Compare other possible solutions.

5. When should I use it?

Understand the trade-offs and decision criteria.

6. How does it behave in production?

Investigate:

  • Failure scenarios.
  • Security implications.
  • Performance.
  • Scalability.
  • Maintainability.
  • Testing.
  • Monitoring.

For example, when studying state management:

  • What is state?
  • Why do applications need it?
  • How does React update state?
  • What alternatives exist to Redux?
  • When should state be local or global?
  • How do you handle stale data and persistence?

This approach prevents you from becoming dependent on tutorials that only teach syntax.


15. Further Reading: Build Knowledge Beyond This Article

These are useful resources to revisit as your understanding develops.

1. Rendering architecture

Rendering on the Web — web.dev

https://web.dev/articles/rendering-on-the-web

Explores rendering strategies, performance, and architectural trade-offs.

2. Laravel frontend architecture

Laravel Frontend Documentation

https://laravel.com/docs/12.x/frontend

Explains Blade, Livewire, Inertia, and frontend integration.

3. React fundamentals

React — Thinking in React

https://react.dev/learn/thinking-in-react

Excellent for understanding component boundaries, data flow, and UI architecture.

4. Server-side rendering

Vite SSR Documentation

https://vite.dev/guide/ssr

Explains how SSR applications are structured and built.

5. Frontend build systems

Laravel Vite Documentation

https://laravel.com/docs/13.x/vite

Explains Vite integration, development, asset building, and production concerns.

Don't read these simply to finish documentation.

Read them to answer engineering questions.


16. Knowledge Assessment: Test Your Engineering Understanding

Now comes the most important part.

Reading an article doesn't mean you have understood it.

You need to apply the concepts to unfamiliar scenarios.

The following assessment contains:

  • Theoretical questions.
  • Conceptual questions.
  • Practical questions.
  • Production debugging scenarios.
  • Architecture decision scenarios.

Instructions:

  1. Answer without searching for solutions.
  2. Explain your reasoning, not just the final answer.
  3. For scenario questions, identify the problem, alternatives, decision, and trade-offs.
  4. If you don't know something, explain what you would investigate.

Part A — Theoretical and conceptual questions

Q1. Frontend Rendering

What is the fundamental difference between SSR and CSR?

Explain where HTML is generated in each approach and what role JavaScript plays.

Q2. Templating Engines

What problem do templating engines solve?

Explain variable interpolation, iteration, conditional rendering, and escaping using an example.

Q3. Client-Server Architecture

Explain the complete HTTP request-response lifecycle when a user submits a form.

What are the responsibilities of the frontend, backend, and database?

Q4. Component Architecture

What is the difference between a component, props, and state?

Explain how composition helps manage a complex interface.

Q5. State Management

Differentiate:

  • Local state.
  • Global state.
  • Server state.
  • Persistent state.
  • Derived state.

Give one example of each.

Q6. Frontend–Backend Integration

What is serialization?

What is data hydration?

Are they the same thing? Explain the difference.

Q7. Routing

Differentiate server-side routing and client-side routing.

Can both exist in the same application?

Q8. Authentication and Authorization

A user successfully logs into an application.

Does that automatically mean they can access every resource?

Explain the difference between authentication and authorization.

Q9. SSR and Hydration

What happens during hydration?

Why might a hydration mismatch occur?

Q10. Build Systems

What is the difference between a development server and a production build?

Explain HMR, minification, code splitting, and tree shaking.


Part B — Scenario-based engineering questions

These questions test your ability to apply concepts rather than repeat definitions.

Q11. Choosing an architecture

Your company wants to build an employee management system.

The application has:

  • Authentication.
  • CRUD operations.
  • Reports.
  • Forms.
  • Interactive dashboards.
  • Role-based access.

Your team already knows Laravel and has limited React experience.

Which architecture would you choose?

A. Laravel Blade.

B. Laravel Livewire.

C. Laravel + Inertia + React.

D. Laravel API + Separate React SPA.

Explain:

  1. Why you selected your approach.
  2. Which alternatives you considered.
  3. What trade-offs your decision introduces.
  4. What might cause you to change your decision later.

Q12. State management problem

You have an e-commerce application.

The navbar shows the cart quantity.

The product page allows users to add products.

The cart page displays selected products.

The checkout page calculates the total.

The user refreshes the browser and the cart disappears.

Explain:

  1. Why did this happen?
  2. Which state management approach would you use?
  3. Where should the cart be persisted?
  4. Which calculations must be performed by the backend?
  5. How would you synchronize the cart between devices?

Q13. Security problem

An employee is logged in.

They manually change the URL:

/tasks/100
Enter fullscreen mode Exit fullscreen mode

to:

/tasks/101
Enter fullscreen mode Exit fullscreen mode

Task 101 belongs to another employee.

The frontend hides other employees' tasks, but the backend returns the requested task.

Identify:

  1. The security vulnerability.
  2. Why frontend protection failed.
  3. Which engineering concept should prevent this?
  4. How would you fix it?
  5. How would you test that the vulnerability is resolved?

Q14. Production debugging

Your React application works perfectly on your local machine.

After deployment:

  • CSS is missing.
  • Some JavaScript files return 404.
  • The home page works.
  • Refreshing /profile returns a 404.

Explain how you would systematically investigate this.

Consider:

  • Build output.
  • Asset paths.
  • Vite configuration.
  • Deployment configuration.
  • Reverse proxy.
  • Client-side routing.
  • Server fallback rules.

Don't immediately change random configuration values. Explain your debugging sequence.

Q15. Performance problem

Your employee dashboard takes 8 seconds to load.

You don't know whether the problem is in the frontend or backend.

Explain how you would investigate:

  1. Network requests.
  2. Backend response time.
  3. Database queries.
  4. JavaScript bundle size.
  5. Rendering performance.
  6. API payload size.

Which tools or measurements would help you identify the bottleneck?

Q16. Component architecture problem

A developer has created a single React component containing:

  • 1,000 lines of JSX.
  • API requests.
  • Form validation.
  • Business calculations.
  • Modal logic.
  • Authentication checks.
  • Table rendering.

What architectural problems do you see?

How would you refactor this component?

Explain the boundaries between UI components, state management, API communication, and business logic.

Q17. Data integrity problem

An employee submits a parent task with three subtasks.

The application saves the parent task successfully, but the server crashes while saving the second subtask.

Now the database contains an incomplete task.

What went wrong?

Explain how database transactions help solve this problem.

What other validation and consistency checks would you introduce?

Q18. Architecture trade-off

Your company is developing a public e-commerce website.

The product pages need SEO and fast initial content.

The admin dashboard is highly interactive and does not need search engine indexing.

Would you use the same rendering strategy for both?

Explain your decision and alternatives.


Part C — Production engineering challenges

These questions are intentionally harder. They test whether you can think beyond the immediate implementation.

Q19. Duplicate submissions

An employee clicks Submit Task twice because the interface appears unresponsive.

Two identical task records are created.

How would you prevent this problem?

Discuss frontend behavior, backend protection, idempotency, and database constraints.

Q20. Authentication architecture

Your company has:

  • A web application.
  • An Android application.
  • An internal admin dashboard.

All three need access to the same backend.

How would you design authentication?

Discuss sessions, cookies, tokens, OAuth, authorization, and credential revocation.

Would you necessarily use the same authentication mechanism for every client?

Q21. Data ownership

The frontend sends:

{
  "task_name": "Development",
  "user_id": 15,
  "hours": 10,
  "is_approved": true
}
Enter fullscreen mode Exit fullscreen mode

The authenticated employee is actually user ID 20.

Identify the potential security and data-integrity issues.

Which fields should the backend accept, calculate, or derive independently?

Q22. Framework independence

You have been working with Laravel for two years.

Your new company uses Django and React.

Identify at least eight engineering concepts from this article that remain relevant.

Explain how you would approach learning their Django implementations without starting your software engineering education from zero.


17. Self-Evaluation: Are You Thinking Like a Software Engineer?

Evaluate your answers using the following scale.

Score Meaning
0 I don't understand the concept
1 I can define it
2 I can explain it with an example
3 I can implement it
4 I can compare alternatives and explain trade-offs
5 I can design, debug, test, and justify it in production

There are 22 questions, each worth 5 points.

Maximum score: 110

Suggested interpretation:

Score Assessment
0–30 Fundamental concepts need work
31–55 Basic conceptual understanding
56–75 Developing practical engineering skills
76–90 Good applied understanding
91–100 Strong engineering reasoning
101–110 Excellent conceptual and production reasoning

This is a self-assessment framework, not a formal industry benchmark or a measure of years of experience.


Conclusion: Become an Engineer Who Understands Problems

Technology changes.

Laravel versions change. React evolves. New frameworks emerge. Libraries become obsolete.

But fundamental engineering problems continue to appear:

  • Rendering information.
  • Managing state.
  • Communicating between systems.
  • Protecting resources.
  • Maintaining data consistency.
  • Designing reusable components.
  • Handling failures.
  • Optimizing performance.
  • Deploying reliable applications.

Don't aim to become someone who knows the syntax of ten frameworks.

Aim to become someone who can understand a new codebase, identify its architectural decisions, recognize its underlying engineering concepts, and contribute reliable solutions.

Frameworks are tools. Engineering principles are what allow you to use those tools effectively.

Learn the problem. Understand the principle. Study the implementation. Build it. Break it. Debug it. Then explain why your solution is the right one.

That is how you develop genuine software engineering understanding.

Top comments (0)