Jump to content

Can anyone share how to build web application using PW?


fmgujju
 Share

Recommended Posts

I would like to build web application using PW because I love ProcessWire so much the way it's built.

What I am looking for is that to use my own relational tables to store data instead of the PW fields. Can anyone help me out to build web application using PW?

Link to comment
Share on other sites

Sure,

1st question: what type of app u wanna build?

2nd : why and which data u wanna store outside the Pages?

For the very first try to point out what you want to do, what should the app do?

What use cases do you have?

Link to comment
Share on other sites

I am part of one of the non-profit organization where they give scholarship to student. 

Here is the business logic:

- Student create their user account online to apply for scholarship and upload their documents/pictures/reports

- Admin user login to review scholarship application and approve/reject application.

- Once application approved, they assign donor to the student

- Student upload their progress report, results and expense details every semester or whenever ask for.

- Admin generate report of accounting how much donation they received, funded, admin expenses.

- Donor logged into to see student's progress and communicate with them

I think above will give you better idea of what I am trying to build. Please note that I will be using PW to build the website for that organization and so I would like to use PW for Web application as well.

Thanks!

Link to comment
Share on other sites

Well doesnt sound much complicated.

Ok, my clock says its 2300, I will collect some usefull posts for you tomorrow morning when MadeMyDays coffee machine brews my first Ninjacoding Cup.

Be sure to receive any help you need.

Hope you could wait so long :)

  • Like 2
Link to comment
Share on other sites

Good morning little app builder ninjas,

As promised yesterday I will point you to the important forum posts on how you could build your own app in Processwire.

Are we all seated?

First we assume that our app is separated into two main parts.

The Frontend with custom login and the Backend for App Administration and User Dashboard.

Before we beginn follow this link: http://processwire.com/api/cheatsheet/

Say hello to the Processwire API Cheatsheet made by Soma, whenever you meet Soma just give him a hug for this outstanding work.

Why? I just hug my wife, girlfriend, boyfriend!

Well the Cheatsheet would be definitely your best and maybe your most intimate friend during developing process. 

Make yourself familiar with the Cheatsheet and make sure you activated the advanced view.

Ok, lets beginn.

Right before coding any line in our editor we have to think about our App.

What should the App do?

Which functionality do we need?

Maybe you mockup your first design, but do not start to code!

Think about your App, think about structuring your data, fields, templates,folder structure and ,believe me (really important), think about name conventions. 

What does he mean with name conventions?

A little example from one of my projects.

The app handles three use cases, Frontend, Backend Administration and Client Dashboard, maybe a normal setting. 

I started to think about naming template files and folders. 

So I came up to the decision to name folders like this:

includes-backend

  --admin

         --views

         --scripts

  --client

         --views

         --scripts

includes-frontend

  --views

  --scripts

Template files are named like this:

backendHome.php

backendMyData.php

home.php

homeNormalContent.php

homeLogin.php

Think about naming your page tree, this is maybe the first step in data structure you do.

Why do we have to do all this, I just wanna code and cuddle together my App.

Sure you could start this way, but do you know how large your app possibly could grow before really thought about?

So, do yourself a favour and write down your thoughts. I´m working currently on a App which contains round about 300 Files of Script Logic and Output forms, editing without any logic in naming would definitely be a mess.

Ok, we thought a lot of our App in theory, what now?

We need a custom login!

You find some usefull snippets and logic about login from frontend in this posts:

http://processwire.com/talk/topic/1716-integrating-a-member-visitor-login-form/#entry15919

http://processwire.com/talk/topic/107-custom-login/ (I really could recommend Renobirds login thoughts and his script)

Read carefully through this posts, they contain almost everything you have to consider on frontend user management. 

You are now on a point of using processwire where you definitely receive input from users, so think about security and make yourself familiar with $sanitizer.

Never ever work with user generated data without sanitizing them!

There are two main headlines you always have to remember:

1st DO NOT SAVE PASSWORDS IN PLAIN TEXT IN YOUR APP

2nd DO NOT TRUST INPUT YOU RECEIVE FROM USERS

Ok, we finished our login and could setup a custom dashboard interface, but what next? My users have to generate some content and I don´t want to do this in my normal processwire administration dash. 

Calm down little Ninja. 

Ryan just gave you a strong and powerful tool. 

He gave you Excalibur and named it just API. 

Follow this links:

http://processwire.com/talk/topic/352-creating-pages-via-api/ (creating content via api)

http://processwire.com/talk/topic/296-programmed-page-creation-import-image-from-url/ (image handling)

Thats it.  :ph34r:

  • Like 13
Link to comment
Share on other sites

Thank you for your valuable post. It's quite a bit of information to digest so it will take little more time to get back to you but meanwhile could you please clarify one item. Do I still have to create PW fields to hold the data?

Link to comment
Share on other sites

It depends, have a look at Ryans Blog Profile.

If think he is handling the comments data outside of Pages.

But in almost every case you could store data in Pages and tread them like a smooth Database Application.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Similar Content

    • By tinacious
      Hi everyone,   I made a walkthrough of a web app I built using ProcessWire for the Tenova Group mining company.   They needed an intranet application to keep track of their daily plant operations. I designed and developed a ProcessWire solution that would allow registered employees at Tenova HYL to record events regularly in an event log.    Storing all of the events in this manner would allow registered users to find the events they're looking for using keyword search, date filters as well as filters based on other criteria.   Each event also allows the user to upload supporting files for download, such as Word documents and PDFs, as well as upload relevant images to be displayed in a modal window.   A high-performing, powerful solution using the ProcessWire CMS.   Read about the project here in my portfolio. See the video here: 

      Tina Holly
      tinaciousdesign.com

    • By briangroce
      Hi guys,
      So, I've been working with ProcessWire quite a bit now and have pretty much transferred most all of the development work that I possible can to PW and it is doing a GREAT job! It is so easy to do complicated tasks.
      I have a new project that I am working on. I am building some integrations from the Amazon MWS SDK. I have built a queue system to send emails through Amazon's Simple Email Service API so that way the email is coming from their servers... 
      The purpose of the application for now is to store new orders that come in to a sellers account, When that order ships, I want to trigger an email for different time periods (24 hours later, 48 hours later, etc...)
      Anyways, I have set up 3 pages in ProcessWire. 
      Scheduled Emails Email to Send Sent Emails I have 3 Cron Jobs Set Up
      A script that runs every 10 minutes and grabs all orders that were placed in the last 15 MINUTES from an Amazon Sellers account and stores it under a page in ProcessWire that I call "Orders" if it isn't there already. If it finds an order that has just shipped, it looks at another script that gives instructions about when to send an email to that person. After this, the script creates a page under "Scheduled Emails" with a few fields including the email that should be sent and the time that it should be sent. The second Cron Job is checking the Scheduled Emails page for children that the current time is greater than the time to send field. If the time to send has passed, then that page is added to the Emails To Send page. The Third Cron Job grabs the emails pages from Emails to Send and loops through them sending the emails from the page fields. This script regulates the rate at which this email is sent via the Amazon API, etc.. With all of that said, the issue I am having here is this:
      I'm having a scalability dilemma. If this system had say 3,000 users who are Amazon Sellers, I have a major timing problem. I cannot grab data for all 3,000 users from the API at the same time. If I get a portion of them every few minutes with the Cron instead, then I may miss orders because my query for orders in the last 15 minutes might not work. Plus if I looped through like that, there might be a big delay on when orders are actually updated. I would like to have the most up-to-date information possible!
      If you guys have any suggestions or direction to be able to download data from an API at the same time with this many users and keep everything running smooth, I would really, really appreciate it!
      Thank You in advance!
      - Brian
×
×
  • Create New...