百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
F

fie

> 编程语言
开源

Fie 是一个以 Rails 为中心的前端框架,通过永久性的 WebSocket 连接运行。

271 stars0 点赞4 次浏览
访问官网GitHub

工具介绍

Fie 是一个以 Rails 为中心的前端框架,通过永久性的 WebSocket 连接运行。

Fie is a Rails-centric frontend framework running over a permanent WebSocket connection.

fie is a framework for Ruby on Rails that shares the state of your views with the backend.

For each controller within which you wish to use fie, you must create a commander. fie uses commanders in the same way a Ruby on Rails application uses controllers.

When an instance variable is changed in the commander, the view is updated. Likewise, if the same variable is modified within the view (through a form for example), the change is reflected in the commander and within other instances of the variable in the view. This means that fie supports three-way data binding.

fie therefore replaces traditional Javascript frontend frameworks while requiring you to write less code overall. If you implement fie within your application, you will no longer rely on Javascript for complex tasks, but rather use it only for what it was intended to be used for: to be sprinkled in your views and make them feel more dynamic (through animations for example).

Installation

  1. Add the gem to your gemfile like so:
ruby
gem 'fie', '~> 0.3.6'
  1. Run the bundler
bash
$ bundle install
  1. Replace yield in your main layout with ``. Below is an example.

    • Old:
    erb
    
    
    
      Fie
      
      
    
    
    
      
    
    
    • New:
    erb
    
    
      
        Fie
        
        
      
    
      
        
      
    
  2. Add //= require fie to your app/assets/application.js file.

javascript
//= require rails-ujs
//= require turbolinks
//= require fie
//= require_tree .
  1. Ensure action cable uses Redis in development by changing async to redis in config/cable.yml.
yaml
redis: &redis
  adapter: redis
  url: 
  channel_prefix: fie_example_app_production

development: *redis
test: *redis
production: *redis
  1. Create an app/commanders folder.

  2. Restart your application.

  3. Create your first commander in the app/commanders with the same prefix as one of your controllers. e.g. app/commanders/hello_world_commander.rb

ruby
class HelloWorldCommander < Fie::Commander
end

Hello World

Create a hello world app using our tutorial.

Usage

Usage is documented and described in our guide.

Development

Your first step is to run npm install within the root folder in order to install the relevant NodeJS packages.

To work on the JavaScript, begin by running npm run build. This will start a watcher that will automatically transpile your ES6 within the lib/javascript folder into a bundle within vendor/javascript/fie.js using webpacker.

The Ruby files can be found within lib/fie and their development is the same as in any other gem.

Please add tests if you add new features or resolve bugs.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/raen79/fie. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Fie project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

Issues· 26 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言