Giter Club home page Giter Club logo

live_php_editer's Introduction

Live Php Editor

This Editer πŸ–Š is created with the help of java β˜•. It presents the use of simple java IO ✍ to make some creative Apps. Basic understanding of java and javafx is enough to customize πŸ›  this accourding to your needs.

Requirements

  • JDK 9 β˜• or any JDK with openfx lib (Some changes in import code section is needed in order to use openfx)
  • Php

Feature

  • Handle multiple πŸ”’ tab at a time
  • Very lightweight πŸƒ
  • Uses simple java IO ✍

Source code structure

./Editer.css
./PHPServer.java
./phpe2.png
...

Ignore any extra files in source code. Let's take a look att code.

  1. Editer.css - This defines css 🎨 for application. Javafx supports css integration in code this provides javafx an edge over other GUI tool such as Swing or AWT.
  2. PHPServer.java - This is main class to handle all action from taking input to rendering output and showing to the user.
  3. phpe2.png - It's only logo for application .

Working

So how all this works ? So answer is very simple, just using java IO ✍. There are mainly two componets in GUI of application.

  1. TextArea GUI components
  2. WebView GUI components

When user type Php code πŸ‘¨β€πŸ’» into TextArea the corresponding result is shown in the WebView components. Let's take a look at the process behind the the seen.

  1. The code written by the user is fetched by the application and written to a temporary php file πŸ“ after every keystroke.
  2. The generated temporary php fileπŸ“ then executedβš™ by the php program to generate equaivalent html code which is saved to another temporary html fileπŸ“.
  3. The generated temporary Html response file πŸ“ by php code is loaded into WebView.
  4. That's all 🎯.

Note:- If the local file πŸ“ is opend instead of creating new file then at the end when user press Ctrl+S or choose save from menu the current state of file in saved to opened local file. As it should be.

Ruuning Application

Just run β–Ά the PHPServer.java as normal java program and You will be all set to use this lightweight app.

javac PHPServer.java
java PHPServer

Screenshot

What can be improved

  • Syntax highlighting
  • Links πŸ”— opening behaivour, Mainly for target="_blank"

live_php_editer's People

Contributors

sandeep-source avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

live_php_editer's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.