Front-End: The visual elements of a website, or the component that users can see and interact with, are the emphasis of front-end development.
Back-End: Website structure, system, data, and logic are all parts of the back-end development process.
Together, front-end and back-end development build engaging websites with stunning visuals.
🚨 Back-end development are all about the architecture that goes on behind the scenes.. Often dealing with servers and databases
Front-End Code Sample
Please find below the front-end code sample from one of my project:
<!-- Table -->
<section>
<h2>Order List</h2>
<div class="table-wrapper">
<table id="mainGrid" class="alt">
<thead>
<tr>
<th>Order No.</th>
<th>Order Date</th>
<th>Customer</th>
<th>Status</th>
<th>Quantity</th>
<th>Delivery Fee</th>
<th>Sale Price</th>
<th>Total Price</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
qty = qty + item.TotalQuantity;
<tr>
<td>@item.ID</td>
<td>@item.OrderDateTime</td>
<td>@item.Customer</td>
<td>
<a href="~/Order/EditStatus/@item.ID"> @item.StatusName </a>
</td>
<td>@item.TotalQuantity</td>
<td>@item.DeliveryFee</td>
<td>@item.SaleAmount</td>
<td>@item.TotalAmount</td>
</tr>
}
</tbody>
</table>
</section>
Front-End Source Code at GitHub
Back-End Code Sample
Please find below the back-end code sample from one of my project:
[HttpPost("addcart")]
public IActionResult AddCart(int userId, int productId)
{
try
{
var isProductAlreadyAdded = userCartEntity
.FindBy(a => a.UserId == userId
&& a.ProductId == productId
&& !a.IsDeleted).Any();
if (!isProductAlreadyAdded)
{
var userCart = new UserCartEntity
{
UserId = userId,
TotalQuantity = 1,
AddedDateTime = DateTime.Now,
IsDeleted = false,
ProductId = productId
};
userCartEntity.Add(userCart);
return Ok(new Status {IsSuccess = true,
Message = "Item added to cart successfully."});
}
}
catch (Exception ex)
{
Debug.WriteLine(ex);
return Ok(new Status { IsSuccess = false,
Message = ex.Message });
}
return Ok();
}
Back-End Source Code at GitHub
Hi, I’m Wajid Khan. I am trying to explain computer stuff in a simple and engaging manner, so that even non-techies can easily understand, and delivered to your inbox weekly.