2021年12月15日 星期三

Building a web site by Codeigniter 4 (CI4)

    I recently tried to build up a website by Codeigniter4 (known as CI4) and thought it is a pretty good framework.
    There are many tutorials and docs on the internet, so I skipped those things in this article. I'll probably focus on the issues I met during website development. 

Tools list
  • XDebug (Local debug)
  • VS Code with plugin 'PHP Debug' (Editor)
  • XAMPP (Local server)
  • Composer (Codeigniter4 and other comonents)
  • Bootstrap 5 (UI components)
Issues: 
  1. Public tool functions
    I write some tool in the folder 'Helpers' in order to use them accross all the controllers. I'm not sure it is the right way to do that.
  2. Modals in Bootstrap 5
    This is very usefull UI and easy to use except for one condition which is switching between modals. In my case, I need to switch modals according to what stage it is now. Unlikely, the POST data will be cleaned after modal switching. For now, I don't have a solution.
    Instead, I use POST method in very modal and check what stage is now and show the related modal by using javascript.
  3. Authentication check
    I write some authenticaiton check in the folder 'Filters' in order to check if the user has the permission to use the routing (page). In general, it is very convient. But, in some cases, the logic would be complicated if the page has multiple modes. Perhaps, it is due to two type users in my case. One is authenticated by other web site and the other is authenticated by my own web site.
  4. Complex Routing
    I'm still working on organizing the routing strategy. I have amost 50 routing pathes in my route definitions and it is not friendly readable. It is a very minor issue but need to fix it in the future.

2021年12月11日 星期六

Building Android/iOS app from a web site

Recently, I need to build an Android app and an iOS app for a website in a short time, so I choose the Convertify service.  Honestly, it's easy and costs a little money overall. But I still recommend it still needs time and programming skills to do that.


Step1: Buy the apps

Step2: Download source code from the link given in the mail

Step3: Set development environment (Android on windows/iOS on Mac OS)

Step4: Open Android/iOS workspace file (DO NOT open project file, building error might occur sometimes)

Step5: Build Bundled AAB file (Use the key store they provided or create it on your own) / Archive generic device (including upload procedure)

Step6: Upload your AAB file to your Google Play Console / Select your version on App Store Connect (It might take a while after you archived it in Step5.)

Step7: Complete the forms and submit them

Notes:
    After you complete the above steps, you can start to customize your Android/iOS apps such as app name, URL, icon, version number and etc. Why? Because everything you do will affect the building/uploading/archiving failure if you were rookies just like me.

P.S. Convertify support is not very strong. If you ran into some problems, they would recommend you to use "publy.app" service to upload the app for you. Of cause, you need to pay for it.

搜尋此網誌