pyeri 51 Newbie Poster

@fx.eko I don't think it will be as trivial as just putting your VB6 forms and modules into a converter and getting the resulting FPC source files. Free Pascal is a whole different programming language. Comparable to C/C++ but somewhat elegant in syntax and relatively safer due to lack of pointer arithmetic.

Threads like these will help you to migrate your projects, folks who have migrated apps from VB to Free Pascal often share their experiences on these forums. And even though migration might take some initial time and effort, it is very much advisable especially in light of direction that Microsoft Desktop technologies like Windows OS are taking.

And remember, Free Pascal isn't the only option, there are dozen others like Swing, Tkinter, PySide/PyQt, etc. The advantage of FOSS is that even if you switch to a Linux or MacOS desktop tomorrow, your application and code would still remain portable and thus you will future-proof yourself.

pyeri 51 Newbie Poster

You might be able to run it for now but at some point in future, Big Tech's surveillance capitalism model will ensure that Visual Studio 6.0 will eventually stop working on modern Windows versions.
The sane choice here is switching to an open source desktop development framework such as PySide/PyQt, Java Swing or Free Pascal (Lazarus IDE). Especially Free Pascal (a dialect of Delphi) is quite reminiscent of Visual Basic and should be quite easy to transition from VB6 with little effort.

pyeri 51 Newbie Poster

@pritaeas Most modern PHP frameworks like Slim make heavy use of OOP which introduces cruft and bloat. As you can see in that example itself, just for printing a simple Hello string, they ended up creating one Factory class and two other classes for request and response.

While OOP certainly has its uses, not all use cases need this level of bureaucratic scaling.

The vast majority of PHP apps are, in fact, small-medium ones like a simple weblog or a forum which can do with procedural code and less bureaucracy.
I am not asking you to choose this framework, it is not even ready in fact. Still an alpha version at best, needs a bit more work to be fully usable. But I can see some promise in this for a truly minimal and utilitarian PHP micro framework.

pritaeas commented: Best of luck with your endeavour! +17
pyeri 51 Newbie Poster

Folks,

We already know about CodeIgniter and its enormous capabilities as a PHP framework, this very site being a testament of it. But what about an even smaller micro-framework for PHP? Something along the lines of Flask or Bottle? Something you can use to develop things like REST API, prototyping something at initial stage or a frontend SPA app with just basic PHP features?

Today, I want to introduce you to minimal-mvc, an extremely tiny micro framework with just two core scripts viz. routing.php for handling the routing and util.php for working with templates.

Over my years of app development experience, I've found that these two capabilities are the critical minimum required features even in most basic or simple web apps. Adding CRUD and databases is a late stage capability which core PHP is more than capable of handling. But with a solid routing structure and a template system where you can quickly prototype multiple partial content pages based on a parent or base template is often very useful when starting a new app project.

I hope you will explore the minimal-mvc framework and I'll be even more glad if you find it useful for your projects.

Happy Programming!

pyeri 51 Newbie Poster

That's a very fascinating journey, Dani. The early era of the Internet was very different, bulletin boards and IRC were phenomenal, especially when it came to quality of interaction. It's a great achievement that you not only used to be a part but also helped build parts of that Internet.

As the PHP creator himself once said, CodeIgniter is a PHP framework that feels the least like a framework and to a great extent, that holds true today also. In the end, it is just feeble wrappers on top of core PHP objects like $_SESSION, $_POST, etc. With a framework like CodeIgniter, you're much more "near" to the spirit of core PHP than with something like Laravel or Symfony.

Thanks for the discussion links pertaining to CodeIgniter, those are a goldmine! Looking forward to more interaction on this forum, you guys are really doing great.

pyeri 51 Newbie Poster

There are many good recommendations in this thread but the long term solution here is to simply switch to Android. It's a more free platform and ecosystem where apps are available in the Google Play Store for almost everything. And if you want your own custom solution, you can even write your own apps and build installable APKs using Android Studio. It may not be as free as a Linux Desktop but it's surely the next best thing!

pyeri 51 Newbie Poster

Greetings Folks!

I had signed up on Daniweb many years ago but never bothered to seriously post until now. Only when the "social networks" of the world like Reddit and Quora and Twitter started disappointing me beyond the usual excruciating limits did I decide to explore some other programming forums on the Interwebs where open and good faith interaction still seems to exist.

After coming to know that Daniweb uses the very same web programming stack which also happens to be my favorite (Bootstrap + jquery + CodeIgniter), I am starting to have a sense that I might be in the right place! No offense to all the shiny new PHP and JS frameworks out there which get discussed ad-nauseum every single day, but CodeIgniter still has some advantages today which are hard to beat, especially if you're building a small to medium sized web project in PHP:

  1. Small Footprint (about 2-3 MBs of core framework code).
  2. Bells and Whistles included (Routing, MVC, Database interaction, form building, etc.)
  3. Integration with Composer/Packagist.
  4. Proven to be solid for over a decade across the industry.

I mean what else do you need in a web framework? This should fit the bill for almost every web project under the Sun unless you're a supersonic Google or Facebook or Microsoft that is!

Thank you everyone for being such a great community, looking forward to some happy interactions on this network.

Dani commented: You forgot to mention it’s MVC but it doesn’t throw it down your throat +34
pyeri 51 Newbie Poster

I have never bothered to check CI4 as CI3 fulfilled all my web development needs. It required some modifications when PHP 8 came (PHP 8 didn't allow dynamic properties which are used in CI3). But otherwise, it works fine for most small to medium sized projects. One of the best things about CI3 is that it works out of the box with minimum initial configuration or coding, and the memory footprint is so small!

pyeri 51 Newbie Poster

Glad to know that Daniweb uses CodeIgniter! It's a very minimal but robust framework and has all the bells and whistles which other so called "modern" frameworks keep talking about.

I myself use CI3 for most of my freelance projects. For database interaction, I usually don't use the CI models, I prefer dealing with the $this->db object directly with SQL queries. I use a couple of helper functions which make the task of query building easier:

  function build_insert_query($table, $values)
  {
      $fields = [];
      $padding = [];
      $value_array = [];
      foreach($values as $key=>$value) {
          //if (!is_numeric($value)) $value = "'".$value."'";
          $fields[] = $key;
          $padding[] = "?";
          $value_array[] = $value;
      }
      return [ "insert into $table(" . implode(',', $fields) . ") values(" . implode(',', $padding) . ")",
      $value_array ];
  }

  function build_update_query($table, $values, $where)
  {
      $ss = "update ".$table." set ";
      $parts = [];
      $value_array = [];
      foreach($values as $key=>$value) {
          $parts[] = $key."=?";
          $value_array[] = $value;
      }
      $parts[] = "modified_at=?";
      $value_array[] = (new DateTime())->format("Y-m-d H:i:s");
      return [ $ss . implode(',', $parts) . " where " . $where,
      $value_array ];
  }
pyeri 51 Newbie Poster

There are several like Quickbooks, Freshbooks, etc. as others have said. Specifically in the Indian context, I think Tally and Zoho Books are two popular apps which are known to work. Then there are web-based ERPs offered by various vendors which take care of several modules like Inventory, HR and Payroll, Costing, etc. apart from just financial accounting. It all depends on your needs, many firms just build their own custom ERP solutions.

pyeri 51 Newbie Poster

I've had pretty decent experience with xhtml2pdf. The best part about this PDF library is that you don't have to worry about the low level nitty-gritty of PDF creation, you can simply generate a PDF from your HTML formatted content.

pyeri 51 Newbie Poster

if username = "Cust_Name" and if password = "Cust_Pass"
then msgbox" you are logged in"
else
msgbox"login error"

This part is syntactically wrong. It should be something like this:

if (username=="Cust_Name" && password=="Cust_Pass")
{
    MessageBox.Show("You are logged in");
}
else
{
    MessageBox.Show("Error");
}
pyeri 51 Newbie Poster

I have written a simple and minimalist HTTP proxy server that runs on command line. In the Start() method, a TcpListener blocks until it gets a client request and creates a new thread (ThreadHandleClient method) that processes this client, fetches its url and relays data.

The trouble is in the relay logic that I want to refine. In the first inner loop, I receive all webserver data and send it to client until zero bytes are left. In second inner loop, I do vice-versa: receive all client data and send to web-server until zero bytes left. However, the code gets blocked in the beginning of second inner-loop at client.receive(). This is what I'm basically doing:

Any help will be truly appreciated. Thanks in advance.

public void Start(IPAddress ip, int port)
    {
        try
        {
            TcpListener listener = new TcpListener(ip, port);
            listener.Start(100);
            while (!stopFlag)
            {
                Socket client = listener.AcceptSocket();
                IPEndPoint rep = (IPEndPoint)client.RemoteEndPoint;
                Thread th = new Thread(ThreadHandleClient);
                th.Start(client);
            }



        listener.Stop();
    }
    catch (Exception ex)
    {
        Debug.Print("START: " + ex.Message);
    }
}        

public void ThreadHandleClient(object o)
{
    try
    {
        Socket client = (Socket)o;
        NetworkStream ns = new NetworkStream(client);
        //RECEIVE CLIENT DATA
        byte[] buffer = new byte[2048];
        int rec = 0, sent = 0, transferred = 0, rport = 0;
        string data = "";
        do
        {
            rec = ns.Read(buffer, 0, buffer.Length);
            data += Encoding.ASCII.GetString(buffer, 0, rec);
        } while (rec == buffer.Length);

        //PARSE DESTINATION AND SEND REQUEST
        string line = data.Replace("\r\n", "\n").Split(new string[] { "\n" }, StringSplitOptions.None)[0];
        Uri uri = new Uri(line.Split(new string[]