r/webdev - I built a SpaceX app showing upcoming launches, past launches, rocket info, and more!

I built a SpaceX app showing upcoming launches, past launche…

r/webdev - I built a SpaceX app showing upcoming launches, past launches, rocket info, and more!

Hi Everyone,

I’ve been learning React for about 3 months or so and this is the first full sized project I’ve completed and hoping to get some feedback! Being self-taught, it can be hard sometimes to get a good grasp of best practices so I was hoping you guys could give me some feedback on what’s good, and what I need to work on.

Live site: https://spacex-project.netlify.app/

Github: https://github.com/tipenehughes/space-x-app


Source link

Laravel logo.

The 9 Most Popular PHP Frameworks for Developers


PHP has been the most loved programming language across the globe for decades, and it’s for good reasons. PHP development is fast, secure, and rather easy to maintain, plus there’s less manual coding, and there are a plethora of libraries. In today’s time, it is almost 79% of all websites. 

Different PHP frameworks have helped developers come up with amazing product solutions. So, what are the most common PHP frameworks used by developers? And why are these their choices? We’ll be figuring that out in this article, with a bonus of understanding which framework is best for which kind of website. Let’s get started. 

1. Laravel

Laravel logo.

Laravel is a free and open-source PHP framework that was introduced in 2011 has managed to stay the number one choice of developers across the world ever since. One of the main factors that make Laravel supreme is its ability to handle complex web applications more smoothly, quickly, and securely than any other framework.

It also makes the development process slightly less manual, since it eases out tasks like routing, caching, authorization, and authentication. Email verification, hashing, and password reset are easy to carry out with Laravel. It is the prime choice for B2B website developers.

With the introduction of Homestead, which is essentially a pre-packaged Vagrant box, the installation of Laravel has also become very easy. V. 8 is the latest version of Laravel and was released in September of 2020.

2. YiiYii logo.

Yii is a simple but high performance, component-based universal programming framework. It is known for its speed and performance, but most of all, its simplicity. It was launched in late December 2008. It allows you to run third-party code and the Gii code generator quickly gets you a basic structure to work on.

It has a very stringent security backing with bcrypt password hashing and encryption and it’s the perfect choice for you if you’re looking to hire a PHP developer in India for e-commerce projects, CMS systems, and forums. 

3. CodeIgnitorCodeIgnitor logo.

CodeIgnitor is famous for its minimal configuration that allows a web app developer to work at a fast pace. It has been revamped multiple times since its launch in 2006 and the current version is V 4.0.3.

Its footprint, including documentation, is less than 2MB, yet it offers numerous prebuilt modules for the construction of components that are robust and reusable. This makes CodeIgnitor just right for developing dynamic websites. 

It encourages development in MVC architecture but it is very flexible that way and allows you to work with non-MVC apps too. It has robust Content Security in place and includes intrinsic defenses against CSRF and XSS attacks. 

As a developer, you should know that CodeIgnitor is one of the easiest PHP platforms to get accustomed to. Plus, it has a hassle-free setup process. These factors make it ideal for newbies. 

4. SymfonySymfony logo.

Symfony’s primacy comes from its reliability and maturity compared to other frameworks. It was launched way back in 2005 and has been in the market for more than most of the other options we are talking about. It is popular for complying with PHP web standards and design patterns. 

It includes the functionality of built-in testing and is based on an extensive MVC framework, making it ideal for large-scale enterprise web development projects. It enables database engine–independence and 

If you’re looking to hire a PHP developer in India, then you should check their background and previous works with Symfony, since it has a steep learning curve and anyone who has mastered Symfony, can easily be called a web development virtuoso.  

5. CakePHPCakePHP logo.

CakePHP, which has been in the market since 2005, is known to deliver a clean web app development experience. Its configuration is super minimal and does not require you to handle XML or YAML files. It has its own ORM within the framework, giving it a competitive edge. Its security is good too, with CSRF protection.

Its inbuilt Components and Helpers reduce the manual labor for a developer and an extravagantly diverse and thorough set of libraries. This factor makes it a premium choice if your web app includes a lot of rare and unique functionality. 

It was one of the earliest PHP MVC frameworks to disrupt the web development industry, and it has been used by leading brands like 10 Fast Fingers, Printivo, Visit NC, and Coconala.

6. Zend Framework

Zend Framework logo.

Zend is another component-based framework also known as “glue framework” which was launched around 2006 and is in its 3.0.0 version right now. It is an object-oriented MVC PHP that is known for helping developers focus better. 

It enables you to load the components you want as individual libraries, and even to integrate external libraries if and when needed very easily. Also, reusing code is the easiest in Zend. 

However, owing to the complexity of the platform, it can be fairly difficult to catch up with, especially if you’re moving from Laravel or Symfony. Most commonly, only highly experienced developers go for Zend.

7. Phalcon

Phalcon logo.

Phalcon is a rarefied PHP framework whose source code is written in C language, which might sound weird, but it gives one of the fastest coding experiences. This doesn’t necessarily mean that you have to have prior knowledge about C, since you can work with the PHP classes and namespaces that the framework generates.

It’s a high-performance full-stack, memory-resident framework, which was launched in late 2012. It is a compiled code, not an interpreted one, making it a lot quicker. Even its templating engine Volt is known for being really fast. It includes helper classes.

Apart from speed, Phalcon offers well-organized asset management and a universal autoloader. So it’s the top-shelf choice for anyone looking to make a flashing fast website. 

8. FuelPHP

FuelPHP logo.

This 2011-launched MVC design community-driven framework is known for its flexibility. It has a unique, framework-specific version called HMVC or the hierarchical model view controller, which, unlike with MVC, encourages code reuse. It also offers greater extensibility, modularity, and code organization. Consequently, FuelPHP consumes the lesser time of the developer and lesser memory of the PC.

You can deliver variedly sized web projects with the help of FuelPHP. Its security is robust and multi-faceted with the ends of Output Encoding, CSRF, and XSS filtering. 

Apart from its unique command-line utility, another remarkable feature is its inbuilt ORM which is very potent. Other features include RESTful API development, a robust URL routing system, and vulnerability protection. One of the leading industry examples that run on FuelPHP is the Front Desk property management system. 

9. Slim

Slim logo.

As the name suggests, Slim is a micro PHP framework that is extraordinarily lean and quick, owing to its complete independence from third parties. It was created back in 2010 and is currently at version 4.5.0

It’s one of the better frameworks to begin web development with since it is very easy to learn and comes with friendly, simplistic documentation. It is useful in RESTful implementation. It allows the developer to carry out functionality like URL routing, cookie encryption, and client-side HTTP caching with ease. 

Slim PHP framework is meant for small but powerful web apps and APIs.

So, Which One Is Right for You?

It is obvious to be confused when all frameworks seem to be just the right choice for the job. Remember all PhP framework provides a basic structure for web app designing for speedy development but differ in terms of documentation, community, security, scalability, database support ease of use, etc. Hence, all frameworks have their own strengths and weaknesses. So, prioritize your requirements, gauge, and do take an expert’s advice to make an informed decision. 

Source link

r/webdev - Game of CODES

Game of CODES | The ULTIMATE Tool For Codeforces : webdev


Developed using Codeforces API, this one-of-its-kind tool is all about Competitive Programming, be it practicing, analyzing, learning, or even doing contests with your friends! This is full in one package for Codeforces lovers, and have 1000+ users registered and growing.

Just register with your Codeforces handle and boom! You would get some really great problems!


The Game of CODES or simply GOC is a tool that not only analyzes your performance but also recommends questions based on your weak and strong topics! You can train them, track your consistency, do one vs one coding fights with your friends, and much more.

And be ready, for the next Saturday, I would showoff my subproject of GOC also, which I am sure would be really exciting for you!

See Github repo: https://github.com/abhi-824/Game-of-CODES

See its live demo at https://youtu.be/qAiBXo30P9A

r/webdev - Game of CODES | The ULTIMATE Tool For Codeforces
r/webdev - Game of CODES | The ULTIMATE Tool For Codeforces
r/webdev - Game of CODES | The ULTIMATE Tool For Codeforces

Source link

r/webdev - Terrible designers out there, there is hope - Iteration > perfection.

Terrible designers out there, there is hope

I was building a project and I wanted to show the earlier iterations of my website and the most recent one. I am a terrible designer, this doesn’t come from a place of fake modesty – I am a terrible designer. Also do not mind the content – it is nonsensical.

Text editor

r/webdev - Terrible designers out there, there is hope - Iteration > perfection.

First iteraton of text editor

r/webdev - Terrible designers out there, there is hope - Iteration > perfection.

Final iteration of text editor

Feed Page

r/webdev - Terrible designers out there, there is hope - Iteration > perfection.

First iteration of feed page

r/webdev - Terrible designers out there, there is hope - Iteration > perfection.

Final iteration of feed page

Post page

r/webdev - Terrible designers out there, there is hope - Iteration > perfection.

First iteration of post page

r/webdev - Terrible designers out there, there is hope - Iteration > perfection.

Final iteration of post page

I had written my first iteration in pure HTML, CSS. My final iteration is also HTML, CSS but some parts which I found too difficult I had moved to Bulma, which is pretty neat.

If you are unhappy with your website – iterate over and over. This is a time-consuming process, but it is an equally rewarding experience.

If you want to test out the website – I have it over here. Currently, I am running a test DB so probably will delete everything sometime later.

This is a really good resource for the basics.

Source link

random margins after a div

random margins after a div

random margins after a div

hi im making a website for a school project, this is my first one

my website is divided in "sections" so like i have <div id="section1">

but after and before every section the is a big margin

how can i fix this

im not english so sorry for the language


submitted by /u/CatSauce66

Source link

r/webdev - My friend and I created a simple workout tracker. We would love some feedback!

My friend and I created a simple workout tracker. We would l…

r/webdev - My friend and I created a simple workout tracker. We would love some feedback!

Pumpshock workout tracker

My friend and I built a workout tracker in a week as a fun side project at www.pumpshock.com

We used Next.js for the frontend and FaunaDB with a GraphQL API for the data/backend, and Chakra UI for the styling. The site is hosted on Vercel since it works so well with Next. The authentication is still a bit iffy since we just used auth0 and the design is not to my liking yet as we both have no design background.

We would love to receive and feedback or suggestions for added functionality. We are planning to improve the design, add the ability to share workouts and implement workout progression in the future. Thanks guys!

Source link

How to Scrape E-Commerce Data With Node.js and Puppeteer

How to Scrape E-Commerce Data With Node.js and Puppeteer

Web scraping is nothing new. However, the technologies that are used to build websites are constantly developing. Hence, the techniques that have to be used to scrape a website have to adapt.

Why Node.js?

A lot of websites use front-end frameworks like React, Vue.js, Angular, etc., which load the content (or parts of the content) after the initial DOM is loaded. This especially applies to performance-optimized e-commerce websites, where price and production information are loaded asynchronously.

Now, if we access a page like this with PHP, or any other classic server-side language, this content will not be part of the retrieved markup, as we require a browser window for sufficient JavaScript rendering.
This is where Puppeteer comes in. It opens a headless Chrome instance to render a page.

Getting Started – Prerequisites

Let us get started by installing Node.js on our system by initializing a new npm (Node Package Manager) instance. npm allows us to install further packages easily. To begin, run the following command:

With this, we have initialized a new npm instance and installed our headless Chrome browser. At this point, you could also install a DOM parser library to make data extraction a little easier. However, we are going to use the JavaScript built-in querySelector() to parse retrieved HTML.

That’s it. We are finished with all the prerequisites. Let’s start working on our actual web scraper.

Building the Scraper

Let us create a new file, called index.js and start by importing the previously installed Puppeteer library. 

Next, we launch a new headless Chrome window. The await command tells Puppeteer to wait to proceed to the next line until the related statement is completed. Following this pattern, we open up our e-commerce site and tell the browser to wait until the element that contains all information that we want to scrape is visible. 

In our case, this element is a div-container, labeled with the price-box__price class. Now the website is in the state where all information that is relevant to us is visible. 

As a next step, we are going to use a function called evaluate(). It allows us to interfere with the rendered website, which is what we need to do if we want to scrape it.

In the code snippet above, we first select the desired product information and save them into the variables amount and currency. Next, we save them to an object and declare null as a fallback value in case the property does not exist.

The console.log() statement will return the gathered information, as shown in the screenshot below:

We now want to get rid of the linebreaks and all spacing. Additionally, we want to convert the property amount to an integer value. 

This is the complete and finalized code snippet:

This will output the data in an expected and well-structured way:

Of course, you would want to scrape a lot more data properties when applying and running this in a serious web project. But this tutorial is about the concept behind it.

This article was used as a basis for the creation of this article. 

Source link

r/webdev - Push an object to an array using mongoose.

Push an object to an array using mongoose. : webdev

My user schema has an empty array called games. I want to push different objects to that array that contain two properties. The problem is that instead of pushing like nameObj: { name: ‘name’, win: 0 }, what ended to be pushed is between another { }. I don’t know how should I push properly.

Here’s my method.

app.get('/update-user', (req, res) => {
        { username: 'katana_user' },
        { $push: { games: { sfv: { name: videogames.sfv.name, wins: 0 } } } }, (err, success) => {
            if (err) {
            } else {

I’d appreciate any help possible!

r/webdev - Push an object to an array using mongoose.

Source link

Tornado locations (preliminary), Jan1-Apr30, 2018

5 Essential Elements for Developing and Delivering GIS Solut…

Developing a GIS solution is important when performing analysis tasks over specific geographic areas. A GIS or Geographic Information System is a software that captures geographic information and utilizes the data for manipulation, viewing, and analysis depending on which context or parameters it is required.

The potential solution that a GIS can provide is endless. 

Big or small, many businesses and institutions rely heavily on geographic data to understand the demographic areas of possibilities. For example, a fast-food center aiming to maximize its catchment area and accessibility will look for demographic information collected from the busiest roads, the best junctions, and leisure centers such as shopping malls and multiplex theatres.

A telecom provider will need to understand if the network condition over a region is good. If not, then they will work on delivering optimized solutions.   

As you can see, geographic data is crucial for all business making decisions. But geographic data alone is useless without attribute data (any data that gives you useful information about a particular area, population, network strength, quality, etc), which can be Continuous data or Discrete data.

The question now that must be lurking in your mind is, how would all this information help you develop a solution? This is where GIS comes in. GIS Provides Multiple Source Data Compilation and Single Data Representation 

GIS works based on four elements. These elements may be unrelated, but, when brought together, serve as a useful source of information. These four elements are— 

  1. Data acquisition
  2. Data storage and retrieval
  3. Data transformation and analysis
  4. Reporting

The compiled data is then presented on a single graphical user interface and from there further analysis work continues.

Take a look at how GIS data representation becomes a useful source of information and solution. The following map shows potential areas reported to be prone to tornadoes between Jan 1 – April 30, 2018.

Tornado locations (preliminary), Jan1-Apr30, 2018

Fig. 1 —  Spatial Discrete Data Representation

The second map shows the average monthly temperature in the contiguous United States as recorded in April 2020.

Average monthly temperature in the contiguous United States

Fig. 2 —  Spatial Continuous Data Representation

About GIS Maps

Maps are considered the simplest form of visual representation of data. It can become a highly interactive analysis tool when combined with different data interpretation and color segregation methodologies.

Below is a GIS map representing America’s racial diversity using precisely 308,745,538 million dots of data. On the map, each value is color-coded to represent an individual dot’s ethnicity. For example, the blue dots represent Caucasian, the green dots represent African American, the red dots represent Asian, the orange dots represent Hispanic, and the brown dots represent Other / Native American / Multi-Racial.

GIS map representing America's racial diversity

I like the map mainly because of the way the values are displayed using colors. However, what if I want to get a more granular view of the map? Would zooming help? Or would it lead to data overlapping? (I think binning would make better data representation on the map than data points. However, that’s another topic of discussion entirely.)

Creating a Web Application With GIS Map Support

Developing and delivering a web application with a GIS solution calls for a proper understanding of the elements used for developing a GIS application.

These elements are— 

  • A web application
  • Digital base maps
  • Operational layers
  • Tasks and tools
  • Geodatabases

When the elements are combined, we can build a framework for delivering GIS solutions to end-users. All of these elements are accessible either through the web or through the Local Area Network.

Below is a sample diagram showing a GIS application framework.

Sample diagram showing a GIS application framework

A brief introduction to each element will give you a better understanding.

1. Web Application

A web application provides a software interface to the client — the user point of contact with the application.

The type of web application that you want to develop will depend on which tools the user will use. Also, how the users will view the data.

There are instances where the user’s computer setup and internet speed will matter.  

2. Digital Databases

The base maps are what will provide the geographic context to the web GIS application. For example, applications providing recommended optimization solutions to telecom providers for a selected area would require some of the following base maps displaying terrain and transportation. Choosing the right base map type depends a lot on the user’s work. Some applications will provide users with only one base map type and some applications will provide users with multiple base maps. Developers will need to decide which base map to set as default.

Some names of base map types:

  • Street Maps: This is the most common default map type used in software applications for an urban context. Users can zoom in to find more details.
  • Satellite / Aerial Imagery: This type of map is ideal for survey works such as agricultural or environmental mapping. However, this type of map is not suitable for performing statistical analysis. Make sure you check the resolution and the age to get the most up-to-date map.

3. Operational Layers

These are a small set of layers that you work with directly or produce when running an operation, such as running a query. Layers are tailored to the type of users who are going to use the application. For example, an urban planner will use the GIS application to update the location with information about manhole covers in a sanitary sewer/stormwater system layer. But an urban area analyst will be using the GIS application to view the map where the manhole covers are located. So the layers for an urban planner will be different from the ones used by urban area analysts.

Operational layers will consist of:

  • Editing and data access layers: These are map layers used for editing features, performing queries, and feature selection for analysis.
  • Query results: Applications will send a query request to the server, to which the server will respond by sending a set of records as results. These can include a set of attribute records or individual features. The query results are displayed as map graphics.
  • Result layers derived from analytic model: GIS analysis performed to derive new information, can be added as new map layers. These map layers can be explored, visualized, interpreted, and compared.

Operational layers are dynamic and are retrieved from the GIS database based on the query run.

They are displayed at runtime every time a user zooms or pans the map. In contrast to the base maps that use wide range map scales, operational layers work within a focused range of map scales and resolutions.

How an operational layer is stacked together with other layers and the base map will vary. In some applications, it is displayed on top of the base map to provide geographic context. Again, in some applications, the operational layer is displayed underneath other layers to provide location context. For example, to provide location context for displaying postal code areas by demographic information, the results are often overlaid with transportation lines and place names.  

4. Task Tools

The toolsets added to the application can be common types ranging from the search tool for finding an address or the area selection tool for selecting a region on the map. It can be more specific tools used for running calculations to find out the potential places where network conditions could be worst.

Here are two ways by you which you can determine the tool usage—

  • Having the server do it: Used when a required data is not housed on the client-side and running a calculation query on a given dataset becomes a complex process. Typical examples include finding and routing to the closest facility or finding the best habitat.
  • Having the client do it: It is more suitable when all the data required is present on the client-side. For example, when the set of point features required for generating a heat map is already present on the client-side.

5. Geodatabases

Geographic data is useful not just for running a query and displaying results on the base map. Geodatabases can support all levels of implementation in GIS. The information stored in geodatabases is of immense value when addressing a broad range of questions. Typically a strong geospatial data management framework includes one or more geodatabases.


Designing and developing GIS applications can be either simple or complex. It depends on how your framework looks. If your service or product requires dealing with geographical spatial data, then a GIS solution is the right choice. Whether it is an application for finding nearby taxis or planning civil engineering projects, with GIS tools and associated libraries, you can create and deliver the most versatile solutions.

Source link

r/webdev - different videos in the same DIV, HELPPPPPPP

different videos in the same DIV, HELPPPPPPP : webdev

Hello, I am new to this world of web development. I am currently in a project to continue learning and I have been stuck on this part…

I want to make a player like this page, where it is a div where the video will be played but there are different options where if you choose a reload another different video BUT IN THE SAME DIV … I don’t know if I explain myself and for me it is being very confusing :/, Thanks for the help

r/webdev - different videos in the same DIV, HELPPPPPPP

Source link