What's the difference between Yii 2 advanced application and basic? - yii2

What is the difference between advanced application and basic application in the Yii framework?
Does they have any differences regarding security?

The following table shows the similarities and differences between the basic and advanced templates:
Source: https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/start-comparison.md
As you can see, the main differences are:
Advanced template supports front- and back-end apps;
Advanced template is ready to use User model;
Advanced template supports user signup and password restore.

There is no difference as the underlying core framework code is the same.
The difference is the structure of the project - the most obvious difference is that advanced one already has a "backend" set-up for you, which you can see for yourself:
https://github.com/yiisoft/yii2-app-basic
https://github.com/yiisoft/yii2-app-advanced

There is no much different.
but you already have administration panel(backend) in Yii 2 advanced application template.
backend and frontend work as separate application while using common models and configuration. you can create your own number of apps under root folder.
lets say you want to create RESTFull API in same project. simply you can create another directory call 'api' same as backend or frontend, and it'll contain folder structure same as backend except assets, views, widgets etc.
you have to decide structure of your project based on requirement.
Setup RESTful API in Yii2(budiirawan)

One of the main differences (other than the folder structure to handle the fontend/backend thing) is that the advanced template has a working user authentication system, whereas the basic has the users hardcoded in the user model. The Advanced template has working SignUp/Forgot Password functionality.

There is no difference in the core framework, the difference between the templates is the folder structure, you have the backend, frontend and the common.
Usually I use the backend to make the admin area, and the frontend to make the user area, but if need you can create another directory to make an api as Chanuka Asanka already said. The commonconfigs will be merged with the backend and frontend config files.
The advanced template as some features like signup, password reset and User model ready to use, besides that you dont have any difference, the core still the same so don't have any security difference.

Related

How can I redirect users to different pages based on session data in python

I'm new to django and wanted some guidance on my project. I want to create a web application for managing traffic violations. Where do I have to start?
Here is an example of analysis generated with windev:
What you have pictured is represented in Django by classes called models.
Nevertheless, you should start by learning Django from the official documentation. Additionally, check out the video courses which may be more affordable.

How do I link a react app I am building using webpack to a phpmyadmin external database and query it without showing my database password in the code?

So I am currently learning react and webpack so that I can implement it into my current site. I already have an established phpmyadmin database that pumps out information that I want to appear on my site but I cant figure out how to hide my username and password to the database when programming it. I am used to using php to interact with my database bus since react is purely javascript I am not sure what to do.
You need to have a server running that talks to your database and to your react app. It sounds like you might have this in the form of a PHP application. Your PHP application will need to expose data over HTTP endpoints that you can then fetch from inside of your React application.
This tutorial: https://www.techiediaries.com/php-react-rest-api-crud-tutorial/ would be a great place for you to get started.
I agree that you need to "have a server running that talks to your database and to your react app" as the accepted answer states. On the other hand this does not mean that you have to code it from scratch.
If you don't want to program PHP for the back-end, then you may as well configure software from the list of 'automatic APIs'. An automatic API is "software that turns your database into a REST/GraphQL API".
I'm the author of PHP-CRUD-API, which is an 'automatic API' and I think it suits your needs, but you may as well use any other software from the above list.

Creating individual user profiles

I am working on a project and one of the key components is creating customized user profiles. I already have a schema design for the user data that will generate said profile. But I am lost on how the technology works.
I am mostly front-end so it has been sort of overwhelming. The goal is to allow multiple user profile creations and so far I have only seen that this can be achievable via NodeJs or PHP. I have not found any guides.
I am not sure if I am asking the right questions.
Any help is appreciated. Thank you.
Since you mention you already have schema for the user table, I assume you are going to design your own database and backend node.js API to handle user profiles. You may want to build authentication functionalities in the future. If you are not familiar with Node.js yet, I recommend you to start with https://www.tutorialspoint.com/nodejs/index.htm. It's a good tutorial for beginners.
The whole purpose of a back-end node.js API is building numbers of service with specified route. Once a http request is made to a particular path, it takes parameters and execute some script. In you case the scripts will do something in database containing user profile data, for example, add a row in your data table. This operation is equivalent to creating a new user. Then, the API send response to front-end.
Keep in mind maintaining user profile data is nothing special than regular data. You should be able to pick it up with a couple of days training if you know javascriopt. But if you have to build authentication functionality you need more technologies.

How do sites like shopify.com, github.io, volusion.com, support multiple subdomains per user?

I like the idea that third part apps run at *.github.io *.shopify.com *.volusion.com works, people make own pages (modify/use template), and host inside.
I'm interested in architecture, how all of this happen?
Do they save files in disk, or write inside database
How easily manage dynamic subdomains?
What happens behind the scene?
What language they use?
This is called multitenancy. It can be achieved in a number of ways with on many different server platforms. There are a number of pieces, for example:
URL rewriting rules handled at the load balancer or web server level to let *.site.com act as site.com/users, or something to that effect depending on your platform architecture
A database of tenants (users) and their associated account names or subdomains
Routing or resolution code that conditionally switches the database connection (or tables, or security modifiers, etc.) per request based on the calling tenant
Ultimately, a tenant is just a row in a database table somewhere, and the application is written in a generic way so that each tenant uses the same "base" code. How that works and how it is implemented can vary greatly between applications.
Update: Per your comment, here are some resources specifically dealing with tenancy in ASP.NET:
Simple Multitenancy With ASP.NET MVC 4
Developing Multi-tenant Applications for the Cloud, 3rd Edition (free Microsoft ebook)
ASP.NET MVC 5, Entity Framework, Ninject and Multi Tenancy Setup
Multi-tenancy in ASP.NET MVC

Couchbase share views among developers (import/export functionality)

At first, this question appeared to be too trivial to me to actually require a Stackoverflow post. However, after executing many Google searches for the information, I am at a lost when trying to figure this out about Couchbase.
In Couchbase (I am using the 2.2 Community version), how do I share views among developers? Is there some sort if import/export functionality available? If not, then how does Couchbase intend for developers to share the views that they are using without needing to do manual copying/pasting? It is obvious that the code that a development team would write for querying Couchbase will require accurate view names. Without having a way to send a developer a view file, to accurately setup a Couchbase DB, how can it even be possible to develop with Couchbase locally as a team?
I'm sorry if I sound a little desperate or harsh here, but if it isn't possible to share views among multiple developers, then I don't see how Couchbase can be a viable DB solution for a team of developers trying to share database configuration, similar to how a team using an SQL DB would share schema files to set up the DB.
Several ways you can approach this:
1) Create views programmatically as demonstrated here in java:
http://tugdualgrall.blogspot.com.es/2012/12/couchbase-101-create-views-mapreduce.html
or here in node.js:
http://www.tuicool.com/articles/RvYbQn
2) Store all your views in your version control system (This is the option I use). If you are developing locally then only you need your personal view code, once they are working and your tests are all passing then you can check them in.
I assume you'd then be developing on an testing environment so yes sadly here you'd have to update the views either by hand or by using option 1.
You could also take a look at perhaps using this tool but only for views: http://www.couchbase.com/communities/q-and-a/how-bulk-import-design-docs-and-views-couchbase-server
This functionality currently is not available in the admin UI.
There is a defect/enhancement open Ability to import/export views MB-8436. You can leave there your feedback and vote for it so it will be included in the next release.
In the meantime you can use Design Document REST API
Also there is a workaround blog