Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@Artemix yeah I know that but in asp they separated the UI and the Script qnd you can access UI view via script so how can I do that with php.
-
@RazorSh4rk hi I know how to use bootstrap . what I dont know is for example how to make a table from database or how to make a dropDowList from database.
-
@baronsindo oh, you just
echo '<table>' . row['asd'] . '</table>'
I thought you meant like responsive desing and such -
@Artemix yo i hate js but lets be real, nobody builds sites with plain html anymore
-
@Artemix meh, throwing together something in angular is way easier but whatever floats your boat, i usually stay away from web. I aint very good at php, usually use it for curl
-
@RazorSh4rk just basics , I finished basics in one day and I built a restful api for my android app with php mysql . but I have no idea fo ui .
-
@baronsindo okay artemix will prolly disagree with ne, but just echo out the sql contents to plain html, then find a good frontend framework and let it handle the rest
-
@RazorSh4rk thaks could you recommend a front end framework for me . im like u a desktop android developer. I hate web but I have to learn it .
-
@baronsindo jquery and bootstrap together maybe, but you can get away with just bootstrap. I think i have a repo on my github, the league of legends webapp, what does exactly this, check the code if you want, its kinda simple
-
@Artemix I know some angularjs . and angular4 . those you gave me now are js frameworks ???
-
Here, explanation
You have a server with sql. You use php to get the data from sql. Then you use php to just dump out the data to a simple html file. After that you use one of the things we listed (bootstrap, vue, etc) to make that html look good -
@baronsindo as @RazorSh4rk say about dump php into html. This does not mean an. Html page. Still a .php page but the content on it is html so that when you have php data you can escape into php and place on page which then gets rendered as html when requested. Just a thought.
-
When you try php. What do you do?
- Installed XAMP and make a site.
- Run php in CLI
- php -S
- Other -
hitzoR2637yTake a look at some templating library for HTML output. It's much clearer and easier to create than just echoing data with HTML. I would reccomend Latte (part of Nette framework, but could be used standalone). It has easy to learn and understandable syntax even for people without PHP knowledge.
-
mundo0349797yThis thread is confusing, is it trolling?
@Artemix is giving perfect explanations and the questions keep coming. -
Golang is amazing. So much support and so many libraries, best of all the worlds. Great for Dev
-
jonez78847yJust try to make Ajax calls using jQuery to your .php files. Encode what you return from PHP as JSON. Use bootstrap to style the site. Get that working before looking at frameworks.
-
taglia5717y@baronsindo yes, they are. PHP is a language, ASP is a framework.
Don't forget that PHP is a server side language, and it's never sent to thw client. For client side, you need HTML (with ASO is quite the same thing..)
If you need a framework for PHP, try looking at zend framework or laravel. -
You are a .NET dev? Why would you do PHP? Unfortunately there is an enormous amount of crappy php code out there. You'd better stick to .NET and learn something like Java. Switch will be much easier and Java is excellent OO too. As .net dev you learned to create UI as well I assume? If not focus on front end development if you want to be able to build a decent ui, regardless of the back end technology you use.
-
Crost41087y
-
Ok, look, you're probably coming from ASP.NET Webforms.
There's no easy way of saying this, but .. forget everything you know about web development.
ASP.NET Webforms have committed the capital sin by trying to seamlessly link UI elements with the code, which turned into something really really awful that I only get in nightmares.
Think of it this way:
There is the UI (client side) and the Back-end (server side). The only way they can communicate is via HTTP requests and web sockets.
Today, the 2 are built separately, often by separate people. The front-end is usually absolutely independent, served using static files even (pure html, js, css for example) then the JS pulls relevant data from the back-end and displays it on the page.
But even if you do it the older way, it still means that you have a template that's filled out with data on the back-end, and sends all responses using AJAX or form submits. You have to code all of that.
If it's not accurate, it's because I'm not a UI dev
Related Rants
Today I gave Php a try, I leaned the basics and oriented object programming of it . but now I dont know how to make UI in PHP . ans I need some advice what should I learn next im a .net programmer
undefined
web development
programming
webdev
script
php7
website
php