npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

noradle

v0.16.2

Published

A NodeJS and Oracle DB integration, NodeJS act as http gateway for plsql server pages

Downloads

62

Readme

Want to build solid information system solely on PL/SQL and javascript easily, no rely on any other programming language or technical stack? develop with NORADLE.

What's NORADLE?

The word NORADLE is combination of node.js and oracle, It aims at

  1. write http servlet in PL/SQL with extremely concise code
  2. with node.js as http gateway, give full http protocol support for oracle environment
  3. node.js accessibility to oracle, give node.js ecosystem a real thustworthy db backend

take a first glance at pl/sql servlet code

bind data into html

procedure bind_data is
  cursor c_packages is
    select *
      from user_objects a
     where a.object_type = 'PACKAGE'
       and rownum <= 5
     order by a.object_name asc;
begin
  b.l('<!DOCTYPE html>');
  o.t('<html>');
  o.t('<body>');
  o.t('<table rules=all cellspacing=0 cellpadding=5 style="border:1px solid silver;">');
  o.t(' <caption>', 'bind sql data to table example');
  o.t(' <thead>', o.t('<tr>', m.w('<th>@</th>', 'package name,created')));
  o.t(' <tbody>');
  for i in c_packages loop
    o.t('<tr>');
    o.t(' <td>', i.object_name);
    o.t(' <td>', t.d2s(i.created));
    o.t('</tr>');
  end loop;
  o.t(' </tbody>');
  o.t('</table>');
  o.t('</body>');
  o.t('</html>');
end;

use json data service to populate chart

create or replace package body chart_b is

	procedure common_preface(default_type varchar2) is
		v_chart_type varchar2(30) := r.getc('chart_type', default_type);
	begin
		src_b.header;
		o.u('<link rel=stylesheet/>', '[animate.css]');
		o.u('<script>', '[chart.js]', '');
		o.u('<script>', '[zepto.js]', '');
		o.u('<script>', '[underscore.js]', '');
		o.t('<canvas#cc width=600 height=400>', '');
		o.t('<script>',
				t.ps('
		var ctx = document.getElementById("cc").getContext("2d")
		 , demoChart = new Chart(ctx)
		 , chartType=":1"
		 ;',
						 st(v_chart_type)));
	end;

	procedure salary_min_max_by_job_id is
		cur sys_refcursor;
	begin
		if r.is_xhr then
			open cur for
				select a.job_id, count(*) cnt, avg(a.salary) avg, min(a.salary) min, max(a.salary) max
					from employees a
				 group by a.job_id
				 order by avg asc;
			rs.print(cur);
			return;
		end if;
	
		common_preface('Bar');
		o.t('<div#links>');
		o.u(' <a>', r.prog || '?chart_type=Line', 'Line');
		o.u(' <a>', r.prog || '?chart_type=Bar', 'Bar');
		o.u(' <a>', r.prog || '?chart_type=Radar', 'Rader');
		o.t('</div>');
		b.l('<script>
		$.getJSON(location.pathname+"?data", function(data){
			var salaries = data.$DATA.rows;
			var chartData = {
				labels : _.pluck(salaries, "job_id"),
				datasets : [
					{
						fillColor : "rgba(220,220,220,0.5)",
						strokeColor : "rgba(220,220,220,1)",
						pointColor : "rgba(220,220,220,1)",
						pointStrokeColor : "#fff",
						data : _.pluck(salaries, "min")
					},
					{
						fillColor : "rgba(151,187,205,0.5)",
						strokeColor : "rgba(151,187,205,1)",
						pointColor : "rgba(151,187,205,1)",
						pointStrokeColor : "#fff",
						data : _.pluck(salaries, "max")
					}
				]
			};
			demoChart[chartType](chartData);
		});</script>');
	end;
  
end chart_b;

What NORADLE provide?

  • NORADLE support full dynamic(data driving) web development(whether for html page service or json data service), but more concise than PHP, J2EE, ...
  • NORADLE NDBC make node ecosystem embracing oracle, expand node's realm to serious enterprise information systems
  • NORADLE call out feature extend oracle PL/SQL to access external service/resource, break restrictions

Core thinking

  • use pl/sql stored procedure to implement application/business logic
    • servlet code that access data should be as close as the data, avoid complexity and develop-time and runtime overhead
    • all SQL should be in PL/SQL stored procedure, no string concat, no network transfer
    • no triditional templating, print html/json with concise API, just use pl/sql, introduce no excessive templating language
    • give all function that a triditional servlet tech can provide, but be more concise and easier to master
    • be aware of that middle layer JAVA/PHP/.NET/PYTHON/RUBY... is superfluous, except adding comlexity
    • enjoy the good of oracle, advanced SQL, availility, stability, performance, scalability, tunable...
  • node.js can access oracle, and vice versa, they can aid each other
    • node.js give oracle a http servlet container environment
    • pl/sql can call out by node.js, extending oracle
    • by node.js, oracle became a full servlet container, integrate code and data seamlessly
    • by connectivity to oracle, node.js ecosysetm will extend to the area of enterprise information system

the resource for NORADLE

document site http://docs.noradle.com

demo site http://demo.noradle.com